I have a vspackage that works fine in vs2012, but when I change the target to 4 or 3.5 to target older version, I get compile error :
Error 17 The type or namespace name 'PackageRegistrationAttribute' could not be found (are you missing a using directive or an assembly reference?)
and there is no reference to be added for microsoft.visualstudio.shell.10.0 and 9 Is it possible to create a vspackage in vs2012 for older versions ? Thanks
Rather than add a reference to the Visual Studio SDK assemblies directly, you can add the appropriate VSSDK.* NuGet packages to your project. For example, the Shell assembly you are looking for to target .NET 3.5 (Visual Studio 2008) is VSSDK.Shell.9.
Note that Visual Studio 2010 includes .NET 4, so it is highly unlikely that you will need to build against .NET 3.5. Visual Studio 2008 and earlier did not support VSIX files to package extensions, so you're really going to have your work cut out if you want to develop an extension supporting those older environments.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With