8

I am trying to test developing for SharePoint 2010 on a Windows 7 machine.

I created a new empty SharePoint project, added a web part and deployed, which worked fine.

When I try to run or deploy a second time I get the above error message.

Anyone know how to fix this problem?

10

Apparently, VS 2010 uses WMI to control IIS during a redeploy. Without the features enabled, I got the same "Invalid namespace" error.

The solution was to: open the Turn Windows Features on or off menu in the Control Panel (under Programs), and enable WMI compatibility. The path to the feature is:

Internet Information Services -> Web Management Tools -> IIS 6 Management Compatibility -> IIS 6 WMI Compatibility

enter image description here

  • It helped me resolve the problem, but in windows server 2012 R2 , need to activate this feature in IIS by adding this feature in Add roles and Features Wizard. – John Zachariah Apr 25 '17 at 9:48
  • 1
    Thanks for this. This is still relevant in Windows Server 2016! – Memphis335 Nov 19 '18 at 18:48
  • 1
    This happens with me in SharePoint server 2019 over Windows server 2016 . Enable this feature solves the issue. – Mohamed Ragab May 2 at 13:19
1

Had the same issue on a Windows Vista x64 environment with Visual Studio 2010 RTM and SharePoint Foundation 2010 RTM.

Need to start the SharePoint Administration service (set to manual startup by default).

Go to:

  1. Start
  2. Run
  3. Services.msc
  4. SharePoint 2010 Administration
  5. Right click -> Start

This solved the issue for me.

0

Usually this problem comes when the server is too busy and not getting enough time to retract the Solution package file. What RaM are you using? Try to close all other application and deploy. If you still have problems let me know. I have solved the problem the same way.

0

Same problem with VS2019 and Windows Server 2019.

In modern Windows here's the solution:

enter image description here

  • This is actually the accepted solution but in modern windows' way – Maurizio Aug 30 at 16:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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