Installing SQL Server 2017 Developer Edition: How to repair the visual studio runtime (library) 'Microsoft Visual C++ 2019 X64 Minimum Runtime'? - sql-server

I have a fully updated Visual Studio Professional 2017 installed, and I am now trying to install SQL Server 2017 Developer Edition, but receive the following error message (translated to English by me) and the installation of the SQL server aborts:
The Visual Studio-Runtime Microsoft "Visual C++ 2019 X64 Minimum Runtime - 14.22.27821" has to be repaired.
The error message points me to a guide how to repair or remove programs, so I tried reinstalling SQL Server 2017 and Visual Studio, but both does not help, the error persists.
Is there anything else I could try to fix that broken runtime library? Does it matter that I also have/had the community version of Visual Studio Code installed?

I am not exactly sure what exactly solved my problem, what I tried doing is the following
Under Apps & features within the Windows Settings, I "repaired" all apps with a similar name to the error message, i.e. everything of the kind Microsoft Visual C++ 20xx Redistributable (x86) with xxbeing a 2-digit year, or a year range such as 15-2019.
Deinstalled the Visual Studio Community Edition.
Reboot the system multiple times afterwards and inbetween.
Point 2 might have just cargo cult to ease my mind, but all of this did not solve the issue yet.
Eventually I decided to install SQL Server 2017 Express rather than SQL Server 2017 Developer which miraculously worked. I can not rule out that my IT department solved it by obtaining additional licenses, since I am not able to figure out the exact time when the new keys got active.

I also ran into this problem.
I just updated my version of Visual Studio 2017 Community edition using the Visual Studio Installer and the issue went away.

Related

vs shell installation has failed with exit code 1638

I have received the following error while installing MSSQL 2017 on Windows 2012 R2.
vs shell installation has failed with exit code 1638
You must install SQL Server first before installing Visual Studio 2017.
If you have already installed Visual Studio 2017, do not worry, just follow the steps below:
Uninstall the Microsoft Visual C++ 2017 Redistributable (x86) and (x64)
Then install SQL Server.
Do not forget to select "Database Engine Services"
Change "Startup Type" of SQL Server Browser from "Disabled" to "Automatic"
The installation will be done without any problems:
Then reinstall the Microsoft Visual C++ 2017 Redistributable (x86) and (x64)
This Error means
1-Another version of this program is already installed
2-Visual Studio 2017 Is In Installing Level And Not Complete
3-Visual Studio 2017 installed (Not For All)
If You Have Other Version . Remove Or Update The SSMS.
If Your Visual Studio In Installing Level. Wait To Complete And Then Try To Setup
Else
To fix the issue, use the following workarounds:
Repair the x64 version of Microsoft Visual C++ 2017 Redistributable from Add or remove programs by using following steps:
Open Add or remove programs.
Find and select Microsoft Visual C++ 2017 Redistributable (x64). Click the Change button.
Click the Repair button.
If you encounter this issue when installing TFS, you can start VC_redist.x64.exe from the TFS installation files, and then select repair.
Hope This Help You To Fix
Microsoft Support Article
Do you have Visual Studio 2017 installed in your computer? If so, try uninstalling it, then install SQL Server, and reinstall Visual Studio. I had the same problem today when installing MSSQL 2017, and solved it like that.
I read in some sites you can also try only uninstalling Microsoft Visual C++ 2017 Redistributable (86x) and (64x), but I didn't try this solution, so I'm not sure if it works. It's still worth a shot though, as it's easier than uninstalling the whole Visual Studio.

SQL Server 2017 Express Installation fails

I am trying to install SQL Server 2017 Express on Windows 10 and it is failing.
Here is the details it shows me after failure:
Action required:
Use the following information to resolve the error, and then try the setup process again.
Feature failure reason:
An error occurred for a dependency of the feature causing the setup process for the feature to fail.
Error details:
§ Error installing Microsoft Visual C++ 2015 Redistributable
VS Shell installation has failed with exit code 1638.
Error code: 1638
Log file: C:\Program Files\Microsoft SQL Server\140\Setup Bootstrap\Log\20171018_083459\VCRuntime140_x64_Cpu64_1.log
Visithttps://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=14.0.1000.169&EvtType=VCRuntime140_x64%40Install%400x1638 to get help on troubleshooting.
I am Windows 10 and have Visual Studio 2017 installed.
I'm thinking the problem could be I installed SQL Server Management Studio 2017 before I installed SQL Server.
I have the same setup at home but I installed SQL Server first and then SSMS and everything works fine.
The other difference is at home in the installation dialog it says something the affect that C++ Redistribuble is already installed but at work where it is failing it says it is to be installed in hte list of components.
The problem is likely that there's a newer version of the Visual C++ Redistributable than SQL Server is trying to install, e.g., from Visual Studio 2017. So another way to address this, if you don't need the latest C++ redistributable, is to go to Add or Remove Programs and uninstall all references to Visual C++ 2017 Redistributable. After this, the SQL Server installation should proceed without errors.
I had this error before all I did was(using Win10 x64):
Go to control panel-> Select Programs -> Programs and Features -> Search "c++"
-> In the list select Visual C++ 2017(or your version error) Redistributable -> right click select "change" -> select repair.
After that I was able to continue and successfully installed SQL Server Express 2017.
Note:
Some requires uninstall and reinstall again therefore if the above procedure doesn't work just try reinstalling it.
I figured it out for my environment.
If you have Visual Studio 2017, go back into the installer and install the "ATL C++" workload. Now when you go through the SQL Server 2017 install it will say C++ already installed and the installation will be successful.
I got the solution :
remove VC++ 2017.
download VC++ 2015 from here
install VC++ 2015
install SQL Server 2017
install SSMS 2017
I also had this problem. I just repair the program Microsoft Visual C++ 2017 Redistributable (x86) - 14.16.27029 from Add Remove Program and setup run without any error.
I also found running the repair of the Microsoft Visual C++ redistributable corrected the issue and was able to install SQL 2017 RTM Cumulative Update (CU) 23 KB5000685
Uninstalling the following from Programme and Features option fixed my issue.
Microsoft Visual C++ 2015 Redistributable
MSSQL 2017 installation will automatically add it once the installation is completed.
First make sure you haven't installed SSMS before,
First install SQLSERVER then SSMS.
To resolve this error just uninstall MS visual C++ Redistributable v13/v15/v17 as they get installed already when you install SSMS before.
Run the setup again it will continue installation.

SQL Server Management Studio 17 cannot find one or more components

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?
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:
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.
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).
Reinstall Microsoft Visual C++ 2017 Redistributable (https://go.microsoft.com/fwlink/?LinkId=746572 and https://go.microsoft.com/fwlink/?LinkId=746571) if removed earlier.
Here is a quick fix for cannot find one or more components in SQL Server
Follow these steps:
Run Add or remove programs (Type into run box)
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.
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.
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
For everyone that is coming here in 2022 and has Windows 11 (build 22622.440) installed, this is your reason> Missing components for Microsoft Visual Studio 2017 Shell (isolated)
Disable the sv2 nav pane from experimental features from windows!
Download https://github.com/thebookisclosed/ViVe
Run vive tool from elevated cmd with the option to disable the experimental feature:
vivetool /disable /name:SV2Navpane
Restart windows immeadiatly:
shutdown -r -t 0
Taken from here, thanks to #Erin Stellato: https://feedback.azure.com/d365community/idea/6b7d06dc-9bec-ec11-a81b-6045bd7ac9f9
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.
I'm running SSMS 18 and every time KB5014770 installs, I get this error. If I uninstall this upgrade (KB5014770) it starts working again.
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.
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.
I had same issue and solved very easily. Normally SSMS will look for integrated application. This integrated is installed by default during SSMS setup installation.
I can say your error "Cannot find one or more components. Please reinstall the application" caused because some application is uninstalled or missing by anyhow. To open SSMS will look for some connected integrated application.
Please follow these steps:
search "shell" in Control Panel\Programs\Programs and Features
uninstall any "shell" application
Download from Microsoft below application.
"en_visual_studio_2015_shell_isolated_x86_dvd_XXXXXXXX"
Run the application and allow all application to install during the process.
Once everything is done. Restart your system.

SQL Server 2014 CTP1 Setup failed

I have uninstalled Microsoft Visual Studio 2012 Ultimate and install VS professional 2013
after, i tried to Setup Sql Server 2014 but a message say
"Installation blocked due to detection of version of Visual Studio that install SQL Server 2012 client libraries.."
then i have uninstalled all Microsoft programs figured in this link without uninstalling visual studio 2013 .
and always i get the same problem
any solutions Please
At this point in time, you should be using CTP2, not CTP1.
You should be installing the CTP on a clean machine (preferably a VM), not a system with a bunch of pre-existing software - especially from previous versions of SQL Server / Visual Studio. CTP2 might get around this particular issue for you, but it's still best practice IMHO to run beta software in a clean environment.
Please review the release notes, in full, before proceeding.

Cannot install SQL Server 2008 Management Studio - Need Visual Studio C++ 2008 SP1

Having a really strange issue on a laptop (Windows 7 Home Premium, soon to be updated to Pro)
When i try to install Web Management Studio for SQL Server Express 2008. Every time i try to load it i receive the following:
You must install Visual Studio C++ 2008 SP1
Now, i don't have Visual Studio 2008 installed on this machine, which would make the above make sense with regards to this message and its applied fixes that you can find on Google. I have tried to install the distributables to try and overcome this problem but nothing has worked.
I did have 2010 express installed (now uninstalled), and now have 2012 but it is really becoming annoying. Has anyone had the same issue, where VS2008 is not installed but you still get this and how the hell i can fix it. The registry fixes don't work as i don't have the VS2008 entries to change.
You should clean up your registry to make sure you dont have any residual entry of previous installations.

Resources