Question

I have two SharePoint apps that behave differently in Visual Studio 2017 when I run it on the SharePoint hosted server.

For one app, I can make changes in the Default.aspx file and associated JavaScript files and when I click on Start, it always skips the uninstall step because the SharePoint Add-in on the server is already current.

For another app, Visual Studio always uninstalls the SharePoint Add-in even if nothing changed in the app. I click 'Start', loaded the app, clicked 'Stop' and 'Start' again. Visual Studio went ahead and uninstalled the app.

I compared the Project Settings between both apps and they were the same.

Does anybody know where else I can look to find out why the apps are treated differently in Visual Studio?

Thanks in advance

Update I noticed that when I build the app that keeps getting uninstalled, I see this in the build output... ------ Build started: Project: myapp, Configuration: Debug Any CPU ------ Successfully created package at: C:\Users\Eric\Documents\code\myapp\bin\Debug\myapp.debugapp

I don't see this in the app that skips the uninstall step. Maybe this could be the issue.

Was it helpful?

Solution

It turns out that the 'Target SharePoint Version' settings under Properties -> SharePoint were different between the two.

The app that kept uninstalling was set to SharePoint 2013 while the one that did not keep uninstalling was SharePoint Online. Once I changed the problematic app to SharePoint Online, I was able to avoid having the app get uninstalled.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top