Issue:
When I try to deploy a project built in Visual Studio 2017 for SharePoint 2019 on Windows Server 2019 Standard Edition. I got the same error as above.
Resolution:
Apparently, VS 2017 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:

Technical Solutions Professional | Modern Workplace Architect Lead | Microsoft 365 | SharePoint | Power Platform | MS Teams | React
Leave a Reply