When trying to deploy a SharePoint app, the following error is shown:

Error occurred in deployment step 'Uninstall app for SharePoint': Cannot connect to the SharePoint site: http://example.com/. Make sure that this is a valid URL and the SharePoint site is running on the local computer. If you moved this project to a new computer or if the URL of the SharePoint site has changed since you created the project, update the Site URL property of the project.

Unfortunately, when I go to the properties of the project (Alt+Enter, or right-click on the project file in Solution Explorer, click on Properties in the context menu), there is no “Site URL” neither in SharePoint, nor in any other tab.

How can I change the site URL?

2 Answers 2


Select the project file in Solution Explorer and press F4 (or View, Properties Window).

In the properties which appear in the new window, there is a Site URL:

The screenshot of properties window


If you get the following message

Remote SharePoint Site Connections Not Supported

add your URL in the host file in the folder C:\Windows\System32\drivers\etc host


  • 1
    This link doesn't seem to be related to the content of this answer or question.
    – TylerH
    Commented May 16, 2019 at 21:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.