Mit*_*tch 110 sql-server ssms
我刚刚在仅安装了 VS2019 的计算机上安装了 SSMS 18 GA,当我尝试打开 SSMS 时,会出现启动画面,但随后进程退出。
使用-log参数运行 ssms 会显示一条错误消息:
包 [Task Scheduler Package] 的 CreateInstance 失败:源:“mscorlib”描述:无法加载文件或程序集“Microsoft.VisualStudio.Shell.Interop.8.0,版本=15.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a”或其中之一它的依赖。定位的程序集的清单定义与程序集引用不匹配。(来自 HRESULT 的异常:0x80131040) System.IO.FileLoadException:无法加载文件或程序集“Microsoft.VisualStudio.Shell.Interop.8.0,版本=15.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a”或其依赖项之一。定位的程序集的清单定义与程序集引用不匹配。(来自 HRESULT 的异常:0x80131040)文件名:'Microsoft.VisualStudio.Shell.Interop.8.0,版本=15.0.0.0,文化=中性,PublicKeyToken=b03f5f7f11d50a3a' ---> System.IO.FileLoadException:无法加载文件或程序集“Microsoft.VisualStudio.Shell.Interop.8.0,版本=8.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a”或其依赖项之一. 定位的程序集的清单定义与程序集引用不匹配。(来自 HRESULT 的异常:0x80131040)文件名:'Microsoft.VisualStudio.Shell.Interop.8.0,版本=8.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a'
警告:程序集绑定日志已关闭。要启用程序集绑定失败日志记录,请将注册表值 [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) 设置为 1。注意:有一些与程序集绑定失败日志记录相关的性能损失。要关闭此功能,请删除注册表值 [HKLM\Software\Microsoft\Fusion!EnableLog]。
在 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.CreateInstance(String assemblyString, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfoculture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark) at System.Activator.CreateInstance(String assemblyName, String typeName) at System.AppDomain .CreateInstance(String assemblyName, String typeName)
System.IO.FileLoadException:无法加载文件或程序集“Microsoft.VisualStudio.Shell.Interop.8.0,版本=8.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a”或其依赖项之一。定位的程序集的清单定义与程序集引用不匹配。(来自 HRESULT 的异常:0x80131040)文件名:'Microsoft.VisualStudio.Shell.Interop.8.0,版本=8.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a'
警告:程序集绑定日志已关闭。要启用程序集绑定失败日志记录,请将注册表值 [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) 设置为 1。注意:有一些与程序集绑定失败日志记录相关的性能损失。要关闭此功能,请删除注册表值 [HKLM\Software\Microsoft\Fusion!EnableLog]。
我尝试在 SSMS 上运行“修复”,并尝试修复C:\ProgramData\Package Cache\{AAA9F15B-AF45-4562-9991-93A848D3A902}v15.0.28307.421\redist\vs2017_isoshell_for_ssms.msi,但问题仍然存在。
小智 130
我只是将 Microsoft.VisualStudio.Shell.Interop.8.0.dll 覆盖在C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\PublicAssemblies其中的副本中,..\PrivateAssemblies\Interop然后 IDE 将打开。(感谢 Mitch 发现了有问题的 DLL 名称。)
这看起来像今天流行的问答,所以我很高兴知道这不仅仅是我。
Mit*_*tch 68
正如Ronan Ariely 推荐的那样,官方解决方案已经发布,建议从ssms.exe.config.
在C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\Ssms.exe.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!-- ...snip... -->
<runtime>
<!-- ...snip... -->
<!-- Remove this line (~line 38) -->
<NgenBind_OptimizeNonGac enabled="1" />
<!-- ...snip... -->
</runtime>
<!-- ...snip... -->
</configuration>
Run Code Online (Sandbox Code Playgroud)
如果您运行我之前将程序集添加到 GAC 的解决方案,您可能应该通过运行以下命令卸载它:
gacutil /u Microsoft.VisualStudio.Shell.Interop.8.0,Version=15.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a
Run Code Online (Sandbox Code Playgroud)
Ron*_*ely 33
这是已知问题,SSMS 开发人员团队发布了新的官方解决方法。
您可以在以下链接中查看 Microsoft 反馈系统中的公开票:https : //feedback.azure.com/forums/908035-sql-server/suggestions/37502512-ssms2018-installed-but-will-not-run
提出的第一个解决方法是复制文件:Microsoft.VisualStudio.Shell.Interop.8.0.dll
从目录: C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\PrivateAssemblies\Interop
进入目录: C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\PublicAssemblies
后来发布了一个更有针对性的解决方案(这是我用的):只需删除文件C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\CommonExtensions\Platform\Microsoft.VisualStudio.MinShell.Interop.pkgdef
无论如何,几天前该团队发布了更新,如您在上面的链接中所见。这是官方更新回复中的引用:
在此期间,推荐的解决方法是:
1) 关闭所有 SSMS 实例
2)编辑ssms.exe.config
3) 删除包含以下文本的行(应该是第 38 行): NgenBind_OptimizeNonGac enabled="1"
这与下一版 SSMS 18.x 中的更改相同
笔记!ssms.exe.config 文件的位置在文件夹中:C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE
| 归档时间: |
|
| 查看次数: |
83332 次 |
| 最近记录: |