84
votes

I have just upgraded to Visual Studio 2017 Professional and SSMS 17.

I can access my servers and databases through Visual Studio 17's SQL Server Object Explorer but when I try to execute SSMS outside of the VS IDE it tells me "Cannot find one or more components.  Please reinstall the application".  I have reinstalled SSMS 17 twice and still cannot run it.

The SSMS executable is at:

C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\Ssms.exe.

I get the same problem on another machine running VS 2017 Community.

What is causing the message "Cannot find one or more components.  Please reinstall the application" when I try to execute SSMS outside of Visual Studio? What do I need to do to execute SSMS outside of the VS IDE?

7
SSMS 17 was released yesterday. Did you install it just now and found a problem? Or did you install an RC version? BTW I have VS 2017, 2015, SSMS 16 and 17.0. installed. I had 17 RC3 up to now. The only problems I get appear when I open VS 2015 before SSMS . Dismissing the error screens and reopening SSMS takes care of the errorsPanagiotis Kanavos
I installed SSMS 17 yesterday. It was not the RC.Joe
After uninstalling and reinstalling a collection of VS components and SSMS the problem has disappeared. So I can confirm VS Professional 2017 and SSMS 17 work fine together. In some respects through your example Panagiotis you provided the answer - thanks, why don't you mark it up?.Joe
I got the same error message on Friday, using 17.1.Dismissing and reopening did not resolve the issue.Nick Haslam

7 Answers

198
votes

I had similar problem and in my case it was due to a corrupt Microsoft Visual Studio 2015 Shell (Isolated) which SSMS 17 requires to run outside the VS IDE.

To fix this, I had to do the following:

  1. Uninstall Microsoft Visual C++ 2017 Redistributable (both the x64 and x86). This is to ensure that step (2) will succeed as the repair process of the prerequisites might fail in some cases if newer versions have been installed.
  2. Repair Microsoft Visual Studio 2015 Shell (Isolated) (or reinstall using https://download.microsoft.com/download/C/9/C/C9CA8400-20AA-4488-92A3-F3F6D978AD81/vs_isoshell.exe).
  3. Reinstall Microsoft Visual C++ 2017 Redistributable (https://go.microsoft.com/fwlink/?LinkId=746572 and https://go.microsoft.com/fwlink/?LinkId=746571) if removed earlier.
57
votes

Here is a quick fix for cannot find one or more components in SQL Server

Follow these steps:

  1. Run Add or remove programs (Type into run box)

  2. Repair Microsoft Visual Studio 2015 Shell (Isolated) (Modify > Repair)

The installation process will report that it was unable to install some of the Visual C++ executables as they are already present; this message can be ignored, the repair still fixes the problem reported in the question.

8
votes

For SSMS 2017 delete this folder from the registry:

HKEY_CURRENT_USER\Software\Microsoft\SQL Server Management Studio\14.0_Config

It would be better to export the keys before deleting them.

3
votes

Same steps as Roberto's solution above - but updated links:

1. Uninstall:

Microsoft Visual C++ 2015-2019 Redistributable (x86) - 14.xxxx
Microsoft Visual C++ 2015-2019 Redistributable (x64) - 14.xxxx

2. Repair or Download/Install:

Microsoft Visual Studio 2015 Shell (Isolated)

https://visualstudio.microsoft.com/vs/older-downloads/isolated-shell/

3. Reinstall:

Microsoft Visual C++ 2015-2019 Redistributable (x86) - 14.xxxx

[https://aka.ms/vs/16/release/vc_redist.x86.exe]

Microsoft Visual C++ 2015-2019 Redistributable (x64) - 14.xxxx

[https://aka.ms/vs/16/release/vc_redist.x64.exe]

0
votes

Remove every version installed of visual C++, then run the repair on the Visual Studio 2015 Shell (isolated). Once completed, open the SQL Server Management Studio and it will work.

0
votes

In my case, it was corrupted because the drive that it was installed on originally was removed as part of a drive consolidation exercise. That is to say, it was installed on E:\ but E:\ no longer existed.

I managed to resolve by using VSubst (https://www.ntwind.com/software/utilities/visual-subst.html) and creating a fake drive pointing back to C:\ (run as admin) where there was a "fresh" install of 2015 after downloading the VS 2015 ISO.

I then re-ran the uninstaller, which fails, then inside the log file, on the first line is the path to the "old installer". Now if you run a {PathInLog}\vs_isoshell.exe /uninstall /force with the E:\ created it will force uninstall.

0
votes

In my case, I accidentally uninstall Microsoft Visual Studio 2015 Shell (Isolated) and I got the error "SQL Server Management Studio 17 cannot find one or more components". even though I recover or Repair Microsoft Visual Studio 2015 Shell (Isolated), the same error was there.

  • The only thing I did was reinstall Microsoft Visual Studio 2015 Shell (Isolated). I did not Uninstall Microsoft Visual C++ 2017 Redistributable (both the x64 and x86). this worked for me.