Nick N.
Nick N.

Reputation: 13558

How to change the deployment URL in a sharepoint hosted app later?

I downloaded this microsoft example for a sharepoint hosted app.

When I build an app myself I can set the deployment URL. While this seems a very simple action I can't find how to change or update it later, when it is already set.

So how can I set the sharepoint URL when a project has been deployed already?

Upvotes: 4

Views: 14932

Answers (3)

Chidi-Nwaneto
Chidi-Nwaneto

Reputation: 654

Try this

  1. Open the project path in Windows Explorer

  2. Locate the file <projectName>.csproj.user (or <projectName>.vbproj.user)

  3. Open it with text editor (e.g. Notepad)

  4. Change the SharePointSiteUrl property

  5. Save the file, and then re-open the project (by deploying)

This works perfectly for me..

Upvotes: 0

msounthar
msounthar

Reputation: 353

The easiest way to do it would be to change the SharePoint site URL in the properties of the SharePoint project in the Solution Explorer.

Another way to do this is by editing the csproj.user file like this (source):

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <SharePointSiteUrl>**Your URL here**</SharePointSiteUrl>
  </PropertyGroup>
</Project>

Upvotes: 7

artificer
artificer

Reputation: 253

Site Url is one of the properties of the Project so the first guess would be to look under project “Properties”.So if you right click on the Project and Click on “Properties” towards the end, you will find yourself in Properties Page with a bunch of project properties but no option for Site URL in any of the tabs.For some reasons the property “Site URL” for was not included here.It was instead included in Properties Window for the project.

Properties Page and Properties Window are two separate blocks that displays project properties in the new Visual Studio. So now lets open Properties Window to Change our “Site URl” property.

http://www.learningsharepoint.com/2012/12/22/change-site-url-property-in-visual-studio-2012-for-deploying-sharepoint-projects/

Upvotes: 0

Related Questions