Visual Studio 2017/2019 Installation finished with errors - Couldn't install Microsoft.VisualC.Redist.12
I have just upgraded from Windows 7 to Windows 10 and I tried installing Visual Studio 2017 professional on my pc and I get the following error:
Couldn't install Microsoft.VisualC.Redist.12
I have tried:
- Giving full permissions on both x86 and x64 executables\ and rerun the installation without success
- With full permissions and an administrator account running the files outside the installer but I get "Windows cannot access the specified device, path, or file"
- Deleting the folders in the C:\ProgramData\Microsoft\VisualStudio\Packages\Microsoft.VisualC.Redist.12* and repairing multiple times without success.
- Complete uninstall and reinstall without success
- Completely removed my antivirus application and tried all of the above steps without success
- I have repeated the same steps with the installer of vs2019 and I get the same error
Please let me know if you need any further details.
Exact error:
Package ‘Microsoft.VisualC.Redist.12,version=12.0.30501,chip=x86’ failed to install.
Search URL
https://aka.ms/VSSetupErrorReports?q=PackageId=Microsoft.VisualC.Redist.12;PackageAction=Install;ReturnCode=-2147467259
Details
Return code: -2147467259
Return code details: Access is denied
Any help would be greatly appreciated!
After multiple experiments mentioned above this is what worked in my case.
Steps to follow after the Visual Studio Installation fails with a warning:
- Download the latest Visual C++ 2013 Redistributables x86 and x64
- Install them without restarting Windows
Copy/Replace each of the executables under the following paths: C:\ProgramData\Microsoft\VisualStudio2019\Packages\Microsoft.VisualC.Redist.12,version=12.0.30501,chip=x86 C:\ProgramData\Microsoft\VisualStudio2019\Packages\Microsoft.VisualC.Redist.12,version=12.0.30501.1,chip=x64
Open the Visual studio installer
- Select Modify without selecting any additional features
Once Modify is selected the installation will start, the pasted files will be replaced by a _package.json file and the installation will continue with the rest of the features without any issues.