codemaid
codemaid copied to clipboard
Build error: 'VSSDK' does not exist in the namespace 'Microsoft'
Environment
- Visual Studio version: Microsoft Visual Studio Professional 2019 Version 16.11.3, with the "Visual Studio extension development" workload
Description
I just forked the repo with the purpose to contributing to it. When I try to build the solution, I get the following error in many integration and unit test files:
CS0234 The type or namespace name 'VSSDK' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

If I unload the Unit Test and Integration Tests projects, the solution compiles fine, although it shows this warning:
Found conflicts between different versions of "Microsoft.VisualStudio.ComponentModelHost" that could not be resolved.
There was a conflict between "Microsoft.VisualStudio.ComponentModelHost, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "Microsoft.VisualStudio.ComponentModelHost, Version=15.8.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
"Microsoft.VisualStudio.ComponentModelHost, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was chosen because it was primary and "Microsoft.VisualStudio.ComponentModelHost, Version=15.8.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was not.
References which depend on "Microsoft.VisualStudio.ComponentModelHost, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [C:\dev\oss\codemaid\packages\Microsoft.VisualStudio.ComponentModelHost.15.8.525\lib\net46\Microsoft.VisualStudio.ComponentModelHost.dll].
C:\dev\oss\codemaid\packages\Microsoft.VisualStudio.ComponentModelHost.15.8.525\lib\net46\Microsoft.VisualStudio.ComponentModelHost.dll
Project file item includes which caused reference "C:\dev\oss\codemaid\packages\Microsoft.VisualStudio.ComponentModelHost.15.8.525\lib\net46\Microsoft.VisualStudio.ComponentModelHost.dll".
Microsoft.VisualStudio.ComponentModelHost, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL
References which depend on "Microsoft.VisualStudio.ComponentModelHost, Version=15.8.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [].
C:\dev\oss\codemaid\packages\Microsoft.VisualStudio.Shell.15.0.15.9.28307\lib\net45\Microsoft.VisualStudio.Shell.15.0.dll
Project file item includes which caused reference "C:\dev\oss\codemaid\packages\Microsoft.VisualStudio.Shell.15.0.15.9.28307\lib\net45\Microsoft.VisualStudio.Shell.15.0.dll".
Microsoft.VisualStudio.Shell.15.0, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL
Microsoft.VisualStudio.Package.LanguageService.15.0, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL CodeMaid
```
What can I do to get rid of those errors (and ideally of the warning too)?
Thanks for checking it out and hoping to contribute! We have to build with the lowest supported version so you'll need to use VS2017 to build CodeMaid. Trying to use VS2019 I believe will result in the version conflicts you saw above.
There's a few pieces of information here in case it helps too: https://www.codemaid.net/contribute/