SSMS : How to fix SQL Server Management Studio not opening problem

microsoft sql server management studio not opening problem-thumb

Recently, I installed the SQL Server Management Studio 18 (SSMS) and after just one use, it didn't want to start anymore. The SQL Server Management Studio stopped loading after the splash screen showing up for a brief moment and no messages appeared to show me what was wrong, except for Windows playing the default beep sound notifying me of a problem. In this article, I will show you how I solved this issue.

First, I assumed, the SSMS 18 didn't want to open due to another process running, but looking at the Task Manager, there was none. Next, I tried using the repair option which is shown next.

Using Repair option

We can use the Repair option that is located in "Programs and Features", but the option is a bit hidden. The steps are as follows:

  • On Windows, run the "Programs and Features" utility.
  • From the list of installed applications, select "Microsoft SQL Server Management Studio" and click on the Uninstall button. This will cause the following window to open:
    microsoft sql server management studio 18 repair option
  • Click on Repair button, which will take a while to complete.
  • You will need to restart the computer.

Now if we are lucky, the problem would be solved by now, but in my case, there was no change. Next, I wanted to see if there is some sort of log file for the SQL Server Management Studio, so I could examine it and find out why the application doesn't want to open.

Using the SQL Server Management Studio log file

It turns out, there indeed is a logging feature available, but to use it, we need to run the executing file using a -log argument.

The steps are as follows:

  • Open Windows Explorer and go to the installed folder of the SQL Server Management Studio. In my case using Windows 10, this was at C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE
  • Once there, type cmd in the address bar and press enter:

    running cmd from file explorer address bar

  • The command prompt will open at that specific path. The executable file for the SQL Server Management Studio is ssms.exe and we need to run it with the logging enabled. We do this by using -log argument, followed by the location and the name of the log file. We need to specify the full path to the log file, something like this:
    ssms.exe -log d:\log.txt
    

    This will create a log file at d:\log.txt. Simply modify it to the path of your choice.

  • When the application fails to open again, find the log file and open it using a text editor, like notepad.

Examining the content of the SSMS log file

Looking at the generated ssms.exe log file, it consisted of multiple <entry> tags and some of them were Errors showing 80004005 - E_FAIL. All those errors in a log file happened when the two tasks below were attempted:

  • CreateInstance failed for package [Async Query Service Package]
  • CreateInstance failed for package [Task Scheduler Package]

In both cases, they had the same detailed description of the error:

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

The issue with the Microsoft.VisualStudio.Shell.Interop.8.0 library

So it seemed, the issue had something to do with the Microsoft.VisualStudio.Shell.Interop.8.0.dll file. I searched for this .dll library inside the installed "Microsoft SQL Server Management Studio 18" folder and found two files located at the following path:

  • 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\PrivateAssemblies\Interop

Both files had the same size of 168KB and both showed the same 8.0.50727.938 version when checked the information under Properties:

Microsoft.VisualStudio.Shell.Interop.8.0 dll properties

But, even though, those two files looked identical, by examining the content of the files, it was obvious that they were not the same.

To try to figure out, what was going on, I ran the following command in PowerShell to check for the Assembly version of both library files.

[System.Reflection.Assembly]::LoadFrom("Full Path to Microsoft.VisualStudio.Shell.Interop.8.0.dll").GetName()

For a .dll file located in the PublicAssemblies folder, the result was:

Version Name
8.0.0.0 Microsoft.VisualStudio.Shell.Interop.8.0

And for a .dll file located in the PrivateAssemblies\Interop folder, the result was:

Version Name
15.0.0.0 Microsoft.VisualStudio.Shell.Interop.8.0

From this information, the error message of "The located assembly's manifest definition does not match the assembly reference" made more sense now.

Solution

In the end, the solution was to 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 I did were the following:

  • First, as a precaution, I renamed the existing PublicAssemblies\Microsoft.VisualStudio.Shell.Interop.8.0.dll to something else, just in case I would need that file later.
  • Then I 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.

Missing or deleted Microsoft.VisualStudio.Shell.Interop.8.0.dll

If for whatever reason, you don't have the Microsoft.VisualStudio.Shell.Interop.8.0.dll file at PrivateAssemblies\Interop, you can download the file from pconlife.com website.

The "MD5 hash" of the Microsoft.VisualStudio.Shell.Interop.8.0.dll file is da57504433ae4597798aa8d3ae8d66bf, so make sure, the file downloaded matches the same hash value. You can use this online tool to check the MD5 hash of the files.

Thanks to just a guy commentator for being the first to point out the problem of a missing Microsoft.VisualStudio.Shell.Interop.8.0.dll file.

Conclusion

If you run SQL Server Management Studio 18, but it doesn't open and doesn't give you any error message, it might look like a tough problem to solve. One option is to use Repair located in "Programs and Features", but if that doesn't work, we can also use the ssms.exe log option. In my case, the log file was showing an issue with the Microsoft.VisualStudio.Shell.Interop.8.0 library file. It turns out, the installed folder contains two such .dll files and solution was to copy the one at PrivateAssemblies folder into the PublicAssemblies folder.

Tags:

80 Comments

Click HERE to add your Comment
  1. Joost
    June 9, 2019
  2. MM
    June 11, 2019
  3. Steve
    June 11, 2019
  4. Phil
    June 12, 2019
  5. HemsbyHammer
    June 13, 2019
  6. Jabbo
    June 13, 2019
  7. Edgar
    June 13, 2019
  8. Nikki
    June 15, 2019
  9. Dudley T
    June 17, 2019
  10. Dave
    June 18, 2019
  11. Kaleb
    July 2, 2019
  12. Gilles
    July 4, 2019
  13. Zuhal
    July 7, 2019
  14. JayP
    July 8, 2019
  15. Andre
    July 9, 2019
  16. Reham Murrar
    July 12, 2019
  17. Umapda
    July 24, 2019
  18. Alv
    July 25, 2019
  19. Lukáš
    July 25, 2019
  20. VadP
    July 26, 2019
  21. David
    July 30, 2019
  22. bigDAN
    July 31, 2019
  23. Anns
    August 6, 2019
  24. olivier
    August 7, 2019
  25. salex
    August 9, 2019
  26. Chris
    August 12, 2019
  27. Nori
    August 15, 2019
  28. Carlos
    August 30, 2019
  29. Gurvinder
    September 4, 2019
  30. Aracelli Manrique
    September 10, 2019
  31. Kalpesh
    September 12, 2019
  32. santhosh
    September 21, 2019
  33. TomerZ
    September 24, 2019
  34. labichea
    September 24, 2019
  35. javier
    October 14, 2019
  36. Manikandan
    October 31, 2019
  37. Pedro
    December 5, 2019
  38. James
    January 4, 2020
  39. Tim
    January 26, 2020
  40. satish
    April 1, 2020
  41. zvit
    April 2, 2020
    • admin
      April 2, 2020
  42. Hugo De Kesel
    April 8, 2020
  43. Saj
    April 21, 2020
  44. qwwwwiis
    May 7, 2020
  45. jvc
    May 12, 2020
  46. Carlos
    May 19, 2020
  47. Alexander
    June 10, 2020
  48. Umair
    August 21, 2020
  49. Slawek
    September 28, 2020
  50. zack
    October 30, 2020
    • admin
      October 30, 2020
  51. Raja
    January 7, 2021
  52. ade
    January 18, 2021
  53. Phil the Senachie
    February 7, 2021
  54. Rajesh
    February 23, 2021
  55. Nat
    March 5, 2021
  56. just a guy
    March 11, 2021
    • admin
      March 15, 2021
  57. Ali Miller
    March 20, 2021
  58. Surya
    April 16, 2021
  59. Deion
    June 4, 2021
  60. JC
    June 19, 2021
  61. Scott
    September 14, 2021
  62. LamberMan
    September 24, 2021
  63. DMind
    September 28, 2021
  64. JJJ
    November 1, 2021
  65. Amit Agrawal
    November 24, 2021
  66. Matt
    December 2, 2021
  67. peyn
    January 5, 2022
  68. Alex
    January 10, 2022
  69. Rachi
    January 14, 2022
  70. Paguar
    April 28, 2022
  71. Mals Saragena
    May 29, 2022
    • admin
      May 29, 2022
  72. Amna Farhan
    July 13, 2022
  73. Tim
    October 13, 2022
  74. Divya Shrivastav
    February 18, 2023
  75. someone
    March 11, 2023
  76. eden
    June 15, 2023

Leave a Reply to Andre Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.