Changing the SharePoint Site in a Visual Studio 2010 / SharePoint 2010 project

I created a new Visual Studio project and entered in the url of a site that simply didn’t exist. Whoops! I didn’t want to create a new site for just this project, so I wanted to change the URL that Visual Studio 2010 uses to deploy this SharePoint solution.

It’s not located in the project file itself. It’s located in the user config file of the project.

Here is the file:

Once this file is open, you can change the url, save the file, and close it out.

Old setting:

New setting:

After editing this file, you’ll have to reload your project.

It’s not completely obvious where this setting is, but once you’ve done it, you’ll remember that the key is the user configuration file.


Tags: ,

10 responses to “Changing the SharePoint Site in a Visual Studio 2010 / SharePoint 2010 project”

  1. Marshall Fu says :

    Thanks. Microsoft has to put it in the project properties or somewhere.

  2. Thomas Wolfram says :

    This is in fact a project property and you can change that much easier in solution explorer. Just highlight your project in solution explorer and you will find a property called “Site URL” in the project properties window.

  3. Ashish Lingwal says :

    Thnx buddy….keep going on…

  4. Nitin says :

    thanks 🙂

  5. Anoop George Thomas says :

    Thanks David……..

  6. Lena says :

    Thanks? was usefull for me

  7. Rita says :

    Is there a value I can put in the ‘Site URL’ property so that I can deploy the solution in different site collections?

  8. Eric Jochens says :

    Your first image shows the *.csproj file highlighted, but this is not the file. Your next 2 images reference the actual file which is *.csproj.user

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: