问题
Here are the details about my local development environment:
-Windows 7 Professional
-Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz 2.00 GHz
-8 GB of RAM
-64-bit Operating System
-Microsoft Visual Studio Enterprise 2015 Version 14.0.25431.01
-.NET Framework 4.6.1
I change the "Microsoft Visual Studio Enterprise 2015 with updates" in Windows OS's "Programs and Features" so that I can add "Common Tools for Visual C++ 2015".
When I execute the change run, the update progress Misleadingly states that the updates ran properly.
However, it still does Not to install Visual C++'s "Common Tools for Visual C++ 2015" feature. I know this for a fact because if I change the "Microsoft Visual Studio Enterprise 2015 with updates" in Windows OS's "Programs and Features" then I get the following window with the Visual C++'s "Common Tools for Visual C++ 2015" being Unchecked:
Is it a technical limitation for Windows 7 Professional since I can't install Visual C++'s "Common Tools for Visual C++ 2015" feature?
回答1:
This is a notorious problem with the VS2015 installer. It is not aggressive enough, it relies on the registry to determine if a sub-component is already installed. But doesn't actually verify if the files are still there, it solely uses the registry check. So if the registry is wonky then it goes through all the install motions, nothing seems to go wrong, but when it is done then it still doesn't work correctly.
Exactly what happened to the machine previously is pretty important to know, but everybody forgot what they did 2+ years ago. One notorious problem is previously having a preview version of VS installed. The uninstaller is always the last thing they get right just before shipping the RTM version. There is a clean-up tool available to fix that kind of registry pollution.
Noteworthy is that this problem is especially common for the "Common tools for Visual C++" sub-component. Almost certainly caused by this component also being available as a separate download. That download is supposed to be only used to setup a build server. But the predictable outcome is that somebody gets started on it on their own dev machine but then decide that they need VS instead.
There are a lot of threads at the MSDN Forums about this specific install problem. But they all suffer from the exact same issue, the Microsoft support people only get as far as "check this, check that" but none of them actually know how to repair the registry damage.
The only workaround I know that is reasonably successful is to aggressively uninstall. SO users never told me "it didn't work", but they also don't tell me "thanks dude, it worked". Odd btw, I can't tell how many of them just gave up and decided to reinstall the OS. You make it aggressive by starting the installer from an elevated command prompt and running it with /uninstall /force option. The /force option is the important one, it makes the uninstaller plow on even if the registry doesn't co-operate.
Since it is likely that the separate download was involved with is mishap, I'd start there. Download it again if you don't have it on the machine anymore. Next uninstall VS2015 the same way, do so even if the installer failed. If you have a reason to assume that the machine was exposed to a preview version then also use the cleanup tool. Might as well use it regardless, only way to be sure.
来源:https://stackoverflow.com/questions/43157375/windows-7-professional-fails-to-install-visual-cs-common-tools-for-visual-c