114

I just installed SSMS 18 GA on a computer with only VS2019 installed, and when I try to open SSMS the splash screen will come up, but then the process exits.

Running ssms with the -log parameter reveals an error message:

CreateInstance failed for package [Task Scheduler Package]Source: 'mscorlib' Description: Could not load file or assembly 'Microsoft.VisualStudio.Shell.Interop.8.0, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) System.IO.FileLoadException: Could not load file or assembly 'Microsoft.VisualStudio.Shell.Interop.8.0, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) File name: 'Microsoft.VisualStudio.Shell.Interop.8.0, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' ---> System.IO.FileLoadException: Could not load file or assembly 'Microsoft.VisualStudio.Shell.Interop.8.0, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) File name: 'Microsoft.VisualStudio.Shell.Interop.8.0, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

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.CreateInstance(String assemblyString, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, 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: Could not load file or assembly 'Microsoft.VisualStudio.Shell.Interop.8.0, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) File name: 'Microsoft.VisualStudio.Shell.Interop.8.0, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

I tried running "Repair" on SSMS, and tried a repair of C:\ProgramData\Package Cache\{AAA9F15B-AF45-4562-9991-93A848D3A902}v15.0.28307.421\redist\vs2017_isoshell_for_ssms.msi, but the problem persists.

2
  • 2
    The log file is generated by adding the -log parameter. E.g.: "C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\Ssms.exe" -log C:\drop\log.txt
    – Mitch
    Commented May 2, 2019 at 4:51
  • 1
    You can get the log as well from C:\Users(user)\AppData\Roaming\Microsoft\AppEnv\15.0\ActivityLog.xml without using the -log switch
    – Stephane
    Commented May 15, 2019 at 11:54

6 Answers 6

132

I just overlaid the Microsoft.VisualStudio.Shell.Interop.8.0.dll in C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\PublicAssemblies with the copy from ..\PrivateAssemblies\Interop and the IDE opens. (Thanks to Mitch for discovering the offending DLL name.)

This looks like a popular Q & A today, so I'm glad to know this wasn't just me.

5
  • For me there was an additional Microsoft.VisualStudio.Shell.Interop.8.0 folder to copy into.
    – Andez
    Commented May 24, 2019 at 12:08
  • Worked like a charm and a life-saver. Thanks.
    – HartleySan
    Commented Jun 17, 2019 at 16:52
  • 2
    Worked for me. Copy from \PrivateAssemblies into \PublicAssemblies. Commented Jun 19, 2019 at 19:43
  • Lovely!! Thank you.
    – bjnr
    Commented Dec 10, 2020 at 17:31
  • +1 Got same error after upgrading to Visual Studio 2022 and this worked for me (initial start took a few seconds and the splash screen just stays on screen as if the application has hanged, but wait for it, it eventually opens).
    – Eric Mutta
    Commented Dec 1, 2021 at 21:42
68

As Ronan Ariely reccomends, an official solution has been published which recommends removing a line from ssms.exe.config.

In 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>

If you ran my previous solution of adding the assembly to the GAC, you should probably uninstall it by running:

gacutil /u Microsoft.VisualStudio.Shell.Interop.8.0,Version=15.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a
4
  • 1
    Any version of gacutil should be fine. Or you can use powershell if you don't have a version of the SDK installed.
    – Mitch
    Commented May 12, 2019 at 0:56
  • 1
    Love StackExchange for this. Totally worked for me. Commented Jun 13, 2019 at 7:53
  • Nice.. this work for me Commented Jun 16, 2019 at 8:10
  • How did you know it, man???? Thank you!
    – NoWar
    Commented Jul 23, 2019 at 3:55
35

This is known issue and there is new official workaround which published by the SSMS developers team.

You can view the open ticket at Microsoft feedback system in the following link: https://feedback.azure.com/forums/908035-sql-server/suggestions/37502512-ssms2018-installed-but-will-not-run

Short history:

The first workaround which was presented was to copy the file: Microsoft.VisualStudio.Shell.Interop.8.0.dll

from the directory: C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\PrivateAssemblies\Interop

into the directory: C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\PublicAssemblies

Later, a more focused solution was published (which is what I used): Simply remove the file C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\CommonExtensions\Platform\Microsoft.VisualStudio.MinShell.Interop.pkgdef

Anyhow, several days ago the team publish an update as you can see in the link above. This is a quote from the official updated response:

The recommended workaround, in the interim, is:

1) Close all instances of SSMS

2) Edit ssms.exe.config

3) Remove the line that has the following text (should be line 38): NgenBind_OptimizeNonGac enabled=“1”

That’s the same change that will be in the next release of SSMS 18.x

Note! the location of ssms.exe.config file is in the folder: C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE

6
  • 1
    This should be the approved workaround.
    – Omzig
    Commented Jul 19, 2019 at 14:48
  • Yous it should @Omzig , but for some reason it did not even got the max number of voting😃 Commented Jul 20, 2019 at 17:12
  • 1
    Proper workaround ..!! Thans mate, this fixed the issue. Commented Aug 1, 2019 at 7:29
  • You are most welcome @MohamedAyas 😃 Commented Aug 2, 2019 at 17:46
  • I have SQL Management Studio 2014 but I don't have such a folder. ssms.exe.config is at C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio... and content has nothing to do with the mentioned here. Any help, please?
    – jstuardo
    Commented Aug 28, 2019 at 18:56
1

I have just crossed the same issue on a freshly built Server 2016 with SQL Server 2017 & SSMS 18.0, however it went away after 2 reboots during which the server was fully patched with March 2019 O/S patches. I'll try to do some more testing to figure out if it was really the O/S patches helping this, but I am unaware of anything else installing in the meantime on that server.

It seems more random after reboots, but what I have noticed now is that SSMS works right after installing, but then SCCM in my org starts installing various things and SSMS stops working. Now the suspect is ".NET Framework 3.5 Server Feature 2016"

0
1

I faced the same issue and after searching for a while for this issue, i found the following step-by-step article tackling this issue:

The solution provided is:

Copy the PrivateAssemblies\Interop\Microsoft.VisualStudio.Shell.Interop.8.0.dll file (the one with assembly version 15.0.0.0) into the PublicAssemblies folder.

The steps were the following:

  • First, as a precaution, the author renamed the existing PublicAssemblies\Microsoft.VisualStudio.Shell.Interop.8.0.dll to something else, just in case I would need that file later.
  • Then he copied the Microsoft.VisualStudio.Shell.Interop.8.0.dll file from PrivateAssemblies\Interop into the PublicAssemblies folder.

After this change, the SSMS loaded without any issue.

0

There is another solution to this problem. On the Azure Feedback item SQL Server Management Studio 18 GA (15.0.18118.0) not compatible with .NET Framework 4.8 Erich Signer suggests:

Step 1:

C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\CommonExtensions\Platform\Microsoft.VisualStudio.MinShell.Interop.pkgdef

Rename and make sure this file does not have the .pkgdef extension anymore. Or remove the file.

Step 2:

Remove the following Registry Key (which is created at SSMS 18 Startup using the ".pkgdef" file mentioned above):

HKEY_CURRENT_USER\SOFTWARE\Microsoft\SQL Server Management Studio\18.0_IsoShell_Config\RuntimeConfiguration\dependentAssembly\bindingRedirection\{8BC7AF31-B6DA-4B97-8B36-F0500DECB147}

Based on a comment originally left by omzig

Not the answer you're looking for? Browse other questions tagged or ask your own question.