How do I undo a deployment of a Visual Web Part?

Posted on 2011-04-22
Last Modified: 2012-05-11
I was working through the introductory sharepoint 2010 labs, and deployed a bad Visual Web Part (It was missing this closing tag:  </SharePoint:SPGridView>). I didn't know about this being a problem (since the compile was fine) until after the deployment. When I added the new web part to the home page, at, it created an error. The home page became wacked. When I tried to put the home page in edit mode, it alerts me to the error, and refuses to go into edit mode, so that I might remove the bad web part.

I then fixed the error in Visual Studio and re-deployed (not sure if this was the right procedure or not, but there was no complaints from Visual Studio). However, I still can't get into edit mode. Somehow, the re-deployment failed.

If I can somehow undo the deployment of the Visual Web Part, then perhaps I will get a fixable error in the home page (something along the lines fo a 'missing reference'), then if I remove any such  reference in that page, I may be able to re-deploy a good component, and then set a reference to the good component (i.e., Visual Web Part).

Question by:sperodev
    1 Comment
    LVL 5

    Accepted Solution

    Add the contents=1 in the query string and remove the web part.

    example :-


    It will give the list of all the web part added in your home page. Delete you custom web part and home page will be up and running.

    Add you compiled web part again

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    A question that is asked often, is how to generate sequential numbers in InfoPath Forms. The best way to achieve this is to use a SQL database, along with a stored procedure and a web service to connect Forms Services to the DB. The first thing t…
    If you create your solutions on SharePoint sooner or later you will come upon a request to set  permissions of the item depending on some of the item's meta-data - the author, people assigned as approvers, divisions, categories etc. The most natu…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now