I have a privileges everywhere, but where i deploy a project with webParts, Visual studio, show me following error :

Error 1 Error occurred in deployment step 'Recycle IIS Application Pool': Object reference not set to an instance of an object.

How to solve this proble. Thank you previously!

  • Make sure that you are running the Visual Studio as Administrator.
  • Make sure the application pool of SharePoint web application is running.
  • Check the Site Url of your SharePoint Solution and make sure you assigned it properly and correctly ,

Right click on solution name > Properties > Check Site URL

  • Try to remove your solution from central administration .

  • Check if the SharePoint timer service is running.

  • Make sure that the "Package" folder is exist in your solution explorer.

    • if not exist make sure that it's not excluded from the solution then include it
    • else try to create a new solution and move your web part

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