【发布时间】:2017-09-05 11:52:38
【问题描述】:
我已经为 Visual Studio 2015 和 2017 构建了一个 Visual Studio 扩展。我已经使用 2017 开发了它,并且在 2017 年一切正常。
当我在 VS 2015 上安装它时,我收到一条错误消息,说它无法加载我的包。在 Visual Studio ActivityLog.xml 文件中,我看到以下错误。
如何启用 VS 2015 和 2017 来运行扩展?
CreateInstance failed for package [MainWindowPackage]
Source: 'mscorlib'
Description: Could not load file or assembly 'Microsoft.VisualStudio.Shell.15.0, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Shell.15.0, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.Shell.15.0, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type) at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase) at System.Activator.CreateInstanceFromInternal(String assemblyFile, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo) at System.AppDomain.CreateInstanceFrom(String assemblyFile, String typeName)
【问题讨论】:
标签: visual-studio visual-studio-extensions