Sql Server Management Studio closes immediately after startup

26,922

Solution 1

This solution worked!

Step1:

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.

Step2:

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}

From now on SSMS 18 will start.

Source: SQL Server Management Studio 18 GA (15.0.18118.0) not compatible with .NET Framework 4.8🕗 {toggle_previous_statuses}

Solution 2

I had this same problem running SQL Server 2017 on Windows Server 2012 R2.

• After installing SSMS 18.0 General Availability release (GA), when started, it always closed immediately.

• So I installed Visual Studio 2019 Community Edition with the Data storage and Processing workload and somehow SSMS 18.0 (GA) ran fine without closing, but just once. The next times I tried to start SSMS 18.0 (GA) again, it always closed immediately.

• Having lost my trust on this GA release, I decided to uninstall it and try with a previous release.

• Using the Chocolatey package manager for Windows https://chocolatey.org/packages/sql-server-management-studio I installed SSMS v17.8.1 and everything is working fine now.

Solution 3

Can't believe, that the only solution was to install VS 2015 again. So I use VS 2017 in everyday work, but I must have VS 2015 installed as well, just to make SSMS work...

Solution 4

I took a look at this. Problem seems to be with SMSS installing Microsoft Visual C++ 2017 Redistributable. When that happens, Microsoft Visual C++ 2015 gets uninstalled. However, if you look at the System Requirements at this page:

Microsoft Visual Studio Tools for Applications 2017

you'll see that Microsoft Visual Studio Tools for Applications 2017, which is also installed by SMSS v18.0, requires Microsoft Visual C++ 2015 Redistributable.

So, it seems the crash is caused by Microsoft Visual Studio Tools for Applications 2017 when it tries to find Microsoft Visual C++ 2015 Redistributable and can't since Visual C++ 2017 Redistributable removed it.

Don't bother trying to install Microsoft Visual C++ 2015 Redistributable if 2017 is already there. Installer for 2015 won't do the install if it sees 2017 is already there. Uninstalling 2017 so 2015 will install works, but then, when you reinstall 2017, 2015 is removed.

I guess stay on SMSS v17.9.1 for now.

Share:
26,922
Dariusz
Author by

Dariusz

Updated on June 06, 2021

Comments

  • Dariusz
    Dariusz about 3 years

    Sql Server Management Studio closes in about five seconds after startup. No messages are being displayed (even in a console) and no logs occur in a Windows Event Viewer. I have tried to install different SSMS versions , i.e. 16.X, 17.Y, but it have not helped. I have also tried to repair VS 2017 and SSMS.

    This problem occured for the first time, when I unistalled Visual Studio 2015 and its related components, like SSMS, and installed VS 2017 and newer version of SSMS (16.X).

    What can I do to make SSMS not closing immediately after startup?

  • KKP
    KKP about 5 years
    I can vouch for this. Does someone know which part of the VS 2015 install helps clear this problem? Is it the SQL data services and tools part of the installer? So weird, but this answer helped resolve my problem.
  • Zarepheth
    Zarepheth about 5 years
    I renamed the file in Step 1, but did not see a matching GUID in the Registry for Step 2. Step 1, by itself, was good enough for me.
  • Stuart Aitken
    Stuart Aitken about 5 years
    Weird. I'm running SSMS on Windows Server, there isn't even a copy of Visual Studio on it. This still fixed the problem. Cheers!
  • ransems
    ransems about 5 years
    After a little while, something else updated? I was faced with same problem. So I installed SMS 17, and did not upgrade SMS. Not perfect, but back to work.
  • techie007
    techie007 about 5 years
    Didn't need to do step 2 myself either. It started loading properly once the file was renamed/removed.
  • Jon Fast
    Jon Fast about 5 years
    Having the same exact problem; this solved it for me. SSMS only started once and then never started a subsequent time. The file deletion and removal of the registry key worked perfectly. Thanks!
  • rball
    rball about 5 years
    Makes total sense, I was looking at the 8885c5b6-ce3a-46ca-aedc-f9f2012069f3 key instead! Derp! Yes, I'm kidding.
  • Nick Gallimore
    Nick Gallimore about 5 years
    Worked like a charm without any reboot
  • Carl Pease
    Carl Pease about 5 years
    How you figured that out is beyond me; But, it worked exactly as advertised. TYVM!
  • Alisson Reinaldo Silva
    Alisson Reinaldo Silva about 5 years
    @CarlPease I was thinking the same thing. How do they figure stuff like this xD it worked for me as well :)
  • killjoy
    killjoy about 5 years
    Please change answer to 'Just delete this file' - Such an awesome tool, marred with untested stupidity like this. Typical MS.
  • Arve Systad
    Arve Systad about 5 years
    Worked neatly with SSMS 18 on Windows 10
  • JimMSDN
    JimMSDN about 5 years
    With VS 2019 installed, this does indeed work - but I then get periodic "The ProviderPackage package did not load correctly errors from SSMS (e.g., when I select the top rows from a table) and VS (e.g., upon loading a solution). These messages can be suppressed - but before I do, do others see them as well?
  • Steve
    Steve about 5 years
    This worked for me: SSMS 2018 on Windows Server 2016
  • Benzara Tahar
    Benzara Tahar almost 3 years
    please help others know this is a useful answer by upvoting it