Tuesday, February 1, 2011

How to change the local deployment URL for a visual web part in sharepoint 2010?

In this post we will discuss how to change the local deployment URL for a visual web part in sharepoint 2010?

Also you can check out some posts on:

- Difference between site pages and application pages in SharePoint 2010

- How to create a Site Definition using Visual studio 2010 in SharePoint 2010?

- Add script reference dynamically through code in SharePoint

I am currently developing some custom web parts using Visual Studio 2010 for my SharePoint 2010 project. I have deployed the web parts by giving by local site url. Then i try to change that URL to another site collection.

I have spent the whole 7 hrs, trying to deploy but unable to do. Finally got to know where to change the URL of the local deployment URL.

Open the properties not (right click properties) never do that, Simple select the project then click the icon for the properties window near solution explorer, team explorer etc. Also you can select the project and press F4.

It will open with options like Active Deployment configuration, Assembly deployment Target, Project File, Sandboxed solution, Site URL. This Site url you have to change.

4 comments:

  1. You save my 7 hrs .... thanks dude.

    ReplyDelete
  2. Gr8!... Thanks Man!

    ReplyDelete
  3. Hi, I am getting the following error wheny I deploy a visual web path. I tried to chagned the site URL but still same.
    Please some one help on that.

    Thanks

    Error 1 Error occurred in deployment step 'Recycle IIS Application Pool': Cannot connect to the SharePoint site: http://vmportalx64:1111/sites/example/SitePages/Home.aspx/. 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.

    ReplyDelete