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:
- 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:
- 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: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:
(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:
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 fromPrivateAssemblies\Interop
into thePublicAssemblies
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.
Joost
June 9, 2019Worked for me with the exact same problem!
Thanks a lot. Probably wouldn't have been able to figure this out myself 🙂
MM
June 11, 2019I was having the same problem. Thanks a lots. It helps a lots. It worked for me now, too.
Steve
June 11, 2019I tried the Microsoft solution, turn it off and then turn it back on, no luck. This worked great, thank you so much.
Phil
June 12, 2019Thank you!!!!!!!! Worked perfectly
HemsbyHammer
June 13, 2019Also worked for me - would not have had the first clue as to how to resolve this.
Thanks very much.
Jabbo
June 13, 2019Thanks soooo much!!! Fixed my issue. Appreciate the step by step instruction to validate along the way.
Edgar
June 13, 2019Thank you!! I had the same problem and these solutions have been the right one.
Regards!
Nikki
June 15, 2019Thank you so much, I had the same issue. After implementing the solution, I am able to open SSMS 🙂
Dudley T
June 17, 2019Hi, I had exactly the same problem. SQL Server Management studio worked for a few days and then suddenly stopped working. It shows the splash screen briefly and then closed. The log file (as per instructions above) showed the same error message with the interop file. I copied the file as above and my SQL Server Management Studio opened again - no reboot required.
Thanks for this posting, it really helped!
Dave
June 18, 2019Thank you, worked perfectly and saved me a lot of time 🙂 Interesting how there are numerous comments all around June 2019, wonder if an update has "updated" SSMS 😉
Kaleb
July 2, 2019Gracias! It worked
Gilles
July 4, 2019Thanks a lot from France, same issue before, once applied, it works fine.
Zuhal
July 7, 2019Thank you, worked for me, really liked the way you explain it.
JayP
July 8, 2019You are great!!! Such a simple trick works. Thanks a lot. MICROSOFT NEEDS TO KNOW THIS. I hope they give you a prize for doing their work.
Andre
July 9, 2019Thank you so much. instead of putting the solution, you provided the way to debug, which is even better. Thank you!
Reham Murrar
July 12, 2019Excellent! works with me also
Thanks you 😀
Umapda
July 24, 2019Excellent Article.
Alv
July 25, 2019Thank you!!!!
Microsoft, please read this article
Lukáš
July 25, 2019Thanks a lot 😉 I reinstalled everything many times and didnt know, what to do. This solution works great.
VadP
July 26, 2019Thank YOU!!! It solve my problem!!!
David
July 30, 2019Thank you so much! Now the problem is.. why?
What's changed btw installation and few days after? Could be a cumulative or security update?
bigDAN
July 31, 2019Thanks. Same exact problem. Saved me a lot of time. (Well written article too.)
Anns
August 6, 2019I also had the same problem. ssms work fine till, compulsory weekly, reboot. After reboot it wouldn't work. Now it works like a charm 🙂
olivier
August 7, 2019I had the same problem, that fixed it. Thank you!!!
salex
August 9, 2019Excellent explanation. Worked for me.
Thank you a lot!
Chris
August 12, 2019It worked perfectly for me. Thank you!!!
Nori
August 15, 2019THANK YOU! Great step by step explanations on debugging
Carlos
August 30, 2019omg, it worked! Thanks..
Gurvinder
September 4, 2019Thanks a lot for sharing. This worked for me 🙂
Aracelli Manrique
September 10, 2019Thanks a lot! It worked for me 🙂
Kalpesh
September 12, 2019Thank you for posting this. Solved my problem
santhosh
September 21, 2019This is the only perfect solution in Google. I am a beginner in SQL & was facing an issue opening ssms. This helped me out and made my day happy. Thanks a lot thanks a ton.
TomerZ
September 24, 2019Worked like a charm!
Thanks!
labichea
September 24, 2019Same for me. Excellent
javier
October 14, 2019!que bueno eres!!!
It was driving me crazy.
THANKS A LOT!
Manikandan
October 31, 2019Great !!! Thanks much worked
Pedro
December 5, 2019Great, this works for me.
So helpful.
Many thanks.
James
January 4, 2020Many Thanks!
Works on SSMS ver 15.0.18206.0, which is the most current version as at 4 Jan 2020.
Tim
January 26, 2020Awesome thanks! This solved my exact problem! Legend!
satish
April 1, 2020This solved my issue. Thank you
zvit
April 2, 2020When I do "ssms.exe -log d:\log.txt" I still get the same "cannot open" error and no log file is created.
admin
April 2, 2020Hi,
Have you tried the solution mentioned in this article? If it works, you really don't need the log file. 🙂
Hugo De Kesel
April 8, 2020Hi, I checked out your manual solution. The Microsoft.VisualStudio.Shell.Interop.8.0.dll was already present in the PublicAssemblies and in the Interop directories. I copied the .dll into the PrivateAssemblies and that did the trick. Thank you for putting me in the right direction. Grtz, Hugo
Saj
April 21, 2020Thank you! This is an issue that I've been struggling with for several weeks. Everyone talks about repair/reinstall, which doesn't resolve the issue. Luckily found your page today, and the issue is solved. 🙂
qwwwwiis
May 7, 2020it worked for me, thank you 😀
jvc
May 12, 2020Thank you - same problem, solution worked!
Carlos
May 19, 2020Thank you! You saved me!
Alexander
June 10, 2020Thank you, your instructions helped me a lot!
Umair
August 21, 2020Thanks for the detailed post. I followed your steps and it didn't work for me at first but after a few attempts, it started to work. Although, I lost my connection information
Slawek
September 28, 2020Worked for me as well. Thanks a lot!
zack
October 30, 2020It did not work in my situation. Weird how SSMS was working earlier in the day for me, and then all of a sudden is crashing on open
admin
October 30, 2020Hi,
Try running
ssms.exe
with the -log option and then check the log file. It might contain useful information about the issue you are having.Raja
January 7, 2021I had a same problem and i could not find the Microsoft.VisualStudio.Shell.Interop.8.0 in problematic server.
can any one help?
ade
January 18, 2021I tried the above steps but still it doesnt work. Any useful ideas
Phil the Senachie
February 7, 2021It worked for me -( copying the dll from Interop to Public Assemblies).
It has been intermittent on my system for months - re-occurring sometimes after a restart - through several versions of MSSE 18.x.
Many thanks for your post!!!
Rajesh
February 23, 2021query window is not open . it open in notepad . how to fix the problam
Nat
March 5, 2021Great solution.. i exactly had the same problem and your solution worked great!
The problem popped up after i used the SSIS to create DB and Table... I was very worried because trying learn few things and keep fixing the problems on the systems instead of my understanding and issues with my development.
in brief.. thank you very much for posting this solution
just a guy
March 11, 2021Whoeven needs for some reason the original file of PrivateAssembiles (as i did since i removed it stupidly enough) here's a download link:
https://www.pconlife.com/download/otherfile/137550/da57504433ae4597798aa8d3ae8d66bf/
admin
March 15, 2021Thank you for the link. I did check the MD5 hash file of the downloaded file with the one I have at
C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\PrivateAssemblies\Interop
and they have the same MD5 hash.Ali Miller
March 20, 2021Genius - thank you very much. Such a pain uninstalling and reinstalling after every reboot.
Surya
April 16, 2021Thanks. Your article helped me to resolve the same problem.
Deion
June 4, 2021Thanks, I've been struggling with this for so long and this solved hours of reloading
JC
June 19, 2021Many thanks for sharing this - I now have SSMS back up and running!
Scott
September 14, 2021Excellent article, this worked for me, thank you for saving me hours of problem solving!
LamberMan
September 24, 2021Thanks a lot. It worked for me.
DMind
September 28, 2021Thank you very much!
JJJ
November 1, 2021Thanks!
Amit Agrawal
November 24, 2021Same problem, same resolution. Thanks a lot.
Matt
December 2, 2021You are a genius. Thank you. Worked perfectly (copied the .dll).
peyn
January 5, 2022this is exactly what was happening...thanks a ton buddy!!!
Alex
January 10, 2022THANK YOU A LOT! You are genius!
Rachi
January 14, 2022Thanks a lot, faced same issue and was able to resolve it with the help of your article.
Paguar
April 28, 2022Thank you thank you thank you!
Mals Saragena
May 29, 2022It wont work hope to help me soon please
admin
May 29, 2022Hi,
Have you tried to get the log using
ssms.exe -log d:\log.txt
command and if so, what does the log file say?Amna Farhan
July 13, 2022Thanks a lot. it works
Tim
October 13, 2022Thanks a lot!
I just wander why it happens that you should replace this file, I didn't do anything with ssms, it just stopped work, I replaced files, it started again, whyyyyy 😀
Divya Shrivastav
February 18, 2023It was really very helpful. Thank you for post the solution. I really missed 2 days to debug the issue come from. Once again thanks a lot.
someone
March 11, 2023Dude.. thank you so much!
eden
June 15, 2023Wow just landed into this but finally it worked
Keenan
May 14, 2024Amazing!!! Thank you so much Bud. This really helped.
Jean-Marc
September 2, 2024You saved me precious time ! I struggled several hours finding out to fix my installation, as it appeared some components were uninstalled while uninstalling version 18.
I launched the app ssms.exe from the command line and it asked me weteher I want to import previous settings. I accepted and voilà ! It works now.