Missing vc_runtimeminimum_x86.msi and installation won't work - c++

I'm currently going through the installation process for Visual Studio 2017 Community Edition to use with C++. Halfway through installation, I get an error stating
"The feature you are trying to use is on a network resource that is unavailable. Click OK to try again, or enter an alternate path to a folder containing the installation package 'vc_runtimeMinimum_x86.msi' in the box below."
If I hit cancel, the procedure continues and at the end tells me that the setup has failed. It gives me the error logs attached at the bottom of this post.
Also, I have uploaded the complete logs on the Microsoft Visual Studio developer help forum here.
I'd like to be able to solve this problem without having to do a re-installation of the OS. So far, I've tried /sfc scannow, repairing through the Visual Studio Installer, and reinstalling the C++ redistributables, but all too no avail.
Any help would be greatly appreciated. Thank you.
The product failed to install the listed workloads and components due to one or more package failures. Incomplete workloads Desktop development with C++
(Microsoft.VisualStudio.Workload.NativeDesktop,version=15.0.26403.0)
Universal Windows Platform development
(Microsoft.VisualStudio.Workload.Universal,version=15.0.26403.0)
Visual Studio extension development
(Microsoft.VisualStudio.Workload.VisualStudioExtension,version=15.0.26208.0)
Incomplete components C# and Visual Basic
(Microsoft.VisualStudio.Component.Roslyn.LanguageServices,version=15.0.26208.0)
C++ profiling tools
(Microsoft.VisualStudio.Component.VC.DiagnosticTools,version=15.0.26208.0)
Graphics debugger and GPU profiler for DirectX
(Microsoft.VisualStudio.Component.Graphics.Tools,version=15.0.26208.0)
JavaScript and TypeScript language support
(Microsoft.VisualStudio.Component.JavaScript.TypeScript,version=15.0.26208.0)
Profiling tools
(Microsoft.VisualStudio.Component.DiagnosticTools,version=15.0.26208.0)
Static analysis tools
(Microsoft.VisualStudio.Component.Static.Analysis.Tools,version=15.0.26208.0)
Universal Windows Platform tools
(Microsoft.VisualStudio.Component.UWP.Support,version=15.0.26403.0)
Universal Windows Platform tools for Cordova
(Microsoft.VisualStudio.ComponentGroup.UWP.Cordova,version=15.0.26403.0)
Universal Windows Platform tools for Xamarin
(Microsoft.VisualStudio.ComponentGroup.UWP.Xamarin,version=15.0.26403.0)
VC++ 2017 v141 toolset (x86,x64)
(Microsoft.VisualStudio.Component.VC.Tools.x86.x64,version=15.0.26208.0)
Visual Studio extension development prerequisites
(Microsoft.VisualStudio.ComponentGroup.VisualStudioExtension.Prerequisites,version=15.0.26208.0)
Visual Studio SDK
(Microsoft.VisualStudio.Component.VSSDK,version=15.0.26208.0) You can search for solutions using the information below, modify your selections for the above workloads and components and retry the installation, or remove the product from your machine. Following is a collection of individual package failures that led to the incomplete workloads and components above. To search for existing reports of these specific problems, please copy and paste the URL from each package failure into a web browser. If the issue has already been reported, you can find solutions or workarounds there. If the issue has not been reported, you can create a new issue where other people will be able to find solutions or workarounds. Package
'Microsoft.VisualCpp.Redist.14,version=14.10.25008,chip=x86' failed to install. Search URL: https://aka.ms/VSSetupErrorReports?q=PackageId=Microsoft.VisualCpp.Redist.14;PackageAction=Install;ReturnCode=1603 Impacted workloads Desktop development with C++
(Microsoft.VisualStudio.Workload.NativeDesktop,version=15.0.26403.0)
Universal Windows Platform development
(Microsoft.VisualStudio.Workload.Universal,version=15.0.26403.0)
Visual Studio extension development
(Microsoft.VisualStudio.Workload.VisualStudioExtension,version=15.0.26208.0)
Impacted components C# and Visual Basic
(Microsoft.VisualStudio.Component.Roslyn.LanguageServices,version=15.0.26208.0)
C++ profiling tools
(Microsoft.VisualStudio.Component.VC.DiagnosticTools,version=15.0.26208.0)
Graphics debugger and GPU profiler for DirectX
(Microsoft.VisualStudio.Component.Graphics.Tools,version=15.0.26208.0)
JavaScript and TypeScript language support
(Microsoft.VisualStudio.Component.JavaScript.TypeScript,version=15.0.26208.0)
Profiling tools
(Microsoft.VisualStudio.Component.DiagnosticTools,version=15.0.26208.0)
Static analysis tools
(Microsoft.VisualStudio.Component.Static.Analysis.Tools,version=15.0.26208.0)
Universal Windows Platform tools
(Microsoft.VisualStudio.Component.UWP.Support,version=15.0.26403.0)
Universal Windows Platform tools for Cordova
(Microsoft.VisualStudio.ComponentGroup.UWP.Cordova,version=15.0.26403.0)
Universal Windows Platform tools for Xamarin
(Microsoft.VisualStudio.ComponentGroup.UWP.Xamarin,version=15.0.26403.0)
VC++ 2017 v141 toolset (x86,x64)
(Microsoft.VisualStudio.Component.VC.Tools.x86.x64,version=15.0.26208.0)
Visual Studio extension development prerequisites
(Microsoft.VisualStudio.ComponentGroup.VisualStudioExtension.Prerequisites,version=15.0.26208.0)
Visual Studio SDK
(Microsoft.VisualStudio.Component.VSSDK,version=15.0.26208.0) Log
C:\Users\Owner\AppData\Local\Temp\dd_setup_20170412231725_117_Microsoft.VisualCpp.Redist.14.log
Details Command executed:
"C:\ProgramData\Microsoft\VisualStudio\Packages\Microsoft.VisualCpp.Redist.14,version=14.10.25008,chip=x86\VC_redist.x86.exe" /q /norestart /log "C:\Users\Owner\AppData\Local\Temp\dd_setup_20170412231725_117_Microsoft.VisualCpp.Redist.14.log"
Return code: 1603 Return code details: Fatal error during installation.

I ran into this problem as well on a recent build of Win 10 + trying to install latest VS Community. When I entered this state, things appeared to be super broken. Here's the sequence of events that I took which finally worked:
In the installed, select to "download all packages and then install"
Attempt installation
See the popup
With the popup still up, go here: https://support.microsoft.com/en-us/help/17588/fix-problems-that-block-programs-from-being-installed-or-removed and download the tool
Open the tool and then select "Uninstall" on the page it says "do you need help installing or uninstalling"
On the next page with the list, select Microsoft Visual C++ 2015 (whatever) and hit next to "Try Uninstall"
Repeat steps 5 - 6 until I didn't see any "Microsoft Visual C++ 2015" left in the list. Note that the popup is still showing.
Close the popup
Pause the install and Resume it.
I didn't see the pop up again and it appears to have installed correctly.
If you're coming here a year after the solution was marked without any resolution, try that and see if it works around the issue for you.
Here are some other things I tried which didn't work for me. If the above didn't work for you, maybe try some of the following which I collected through some searching:
Going to C:\Program Data\Package Cache, searching for the msi package, giving the installer the literal path to what I found. Installer complains "wrong version"
Using https://support.microsoft.com/en-us/help/17588/fix-problems-that-block-programs-from-being-installed-or-removed after the install failed and then repairing (same error).
Uninstalling VS 2015 packages after install failed and repairing (same error).
Ignoring the error. When I did this, VS didn't have any templates installed and devenv /installvstemplates didn't solve this.

Go to Control Panel--Programs and Features, uninstall the Visual C++ 2015 Redistribute items.
After that, run the tool: https://support.microsoft.com/en-us/help/17588/fix-problems-that-block-programs-from-being-installed-or-removed. Re-run the VS 2017 installer as administrator, then click the icon besides 'Launch' and choose 'Repair' to repair the VS 2017.

This tool from Microsoft (which was mentioned by others here) worked for me, after I had been searching for an answer for days:
https://support.microsoft.com/en-us/help/17588/windows-fix-problems-that-block-programs-being-installed-or-removed
You have to choose the "I have problems uninstalling" and search for your "C++"-components (in your case the 2017 ones).
There are usually the "Minimum runtime" and the "Additional runtime"-components. After I've uninstalled both of them with this tool, I could just install a programm that uses these runtimes (for example Visual Studio) and it would download and install the missing features, after that, everything workes perfect for me.

Try installing all the things from here: https://support.microsoft.com/ms-my/help/2977003/the-latest-supported-visual-c-downloads
Not sure if you just have to install the x86 version or all of them. recommend that you install all of them but remember to uninstall the ones which you already have.

for me was simple to fix this problem.
Uninstall all visual c++ with Revo Uninstaller Pro
Use MPVCI tool. link(https://www.majorgeeks.com/files/details/multipack_visual_c_installer.html)
enjoy it. for me it works.

Related

How to properly install StyleCop for Visual Studio 2017 Community?

Well i downloaded the newest version, then installed, checked to instal entire files on local drive. I restarted Visual Studio 2017 Community and rerun it. Unfortunatelly i can't find in menu > tools anything with should be connected with stylecop ( as in tutorial "how to use stylecop"). I am using x64 Windows7. I really really don't know how to to use it.
Go to extensions and updates and search for stylecop in the online area.
Choose the one by Chris Dahlberg.
Close VS and it will install.
open your project up and make sure you have a settings.stylecop file in there.
right click on the project in the solution explorer and you will see a run stylecop option
After reading a comment from the extension creator, it appears that future development is targeted for the SytleCopAnalyzers NuGet package. Using VS 2017, this was easy to get running. Instructions here -> https://github.com/DotNetAnalyzers/StyleCopAnalyzers.

How to fix the error "Windows SDK version 8.1" was not found?

I recently updated visual studio 2015 and now, when i try to build any project it always fails and i get the error
Severity Code Description Project File Line Suppression State
Error MSB8036 The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK version in the
project property pages or by right-clicking the solution and selecting
"Retarget solution". Proj D:\Program Files (x86)\visual studio
2017\Common7\IDE\VC\VCTargets\Platforms\Win32\PlatformToolsets\v141\Toolset.targets 34
I retargeted the solution as it said, and the problem persisted, even though the retargetting was completed.I decided to install visual studio 2017 because of this, and, lo and behold, it did the exact same thing.I'm also using windows 7.
What is the problem and how can i fix it?
I faced this problem too. Re-ran the Visual Studio 2017 Installer, go to 'Individual Components' and select Windows 8.1 SDK. Go back to to the project > Right click and Re-target to match the SDK required as shown below:
I installed the 8.1 SDK's version:
https://developer.microsoft.com/en-us/windows/downloads/sdk-archive
It used 1GB (a little more) in the installation.
Update October, 9 (2020). There's a https error: the sdksetup link is https://go.microsoft.com/fwlink/p/?LinkId=323507
"Save link as" should help.
Another way (worked for 2015) is open "Install/remove programs" (Apps & features), find Visual Studio, select Modify. In opened window, press Modify, check
Languages -> Visual C++ -> Common tools for Visual C++
Windows and web development -> Tools for universal windows apps -> Tools (1.4.1)
and Windows 10 SDK ([version])
Windows and web development -> Tools for universal windows apps -> Windows 10 SDK ([version])
and install. Then right click on solution -> Re-target and it will compile
I had win10 SDK and I only had to do retarget and then I stopped getting this error. The idea was that the project needs to upgrade its target Windows SDK.
I realize this post is a few years old, but I just wanted to extend this to anyone still struggling through this issue.
The company I work for still uses VS2015 so in turn I still use VS2015. I recently started working on a RPC application using C++ and found the need to download the Win32 Templates. Like many others I was having this "SDK 8.1 was not found" issue. i took the following corrective actions with no luck.
I found the SDK through Micrsoft at the following link
https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/ as referenced
above and downloaded it.
I located my VS2015 install in Apps & Features and ran the repair.
I completely uninstalled my VS2015 and reinstalled it.
I attempted to manually point my console app "Executable" and "Include" directories to the C:\Program Files (x86)\Microsoft SDKs\Windows Kits\8.1 and C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools.
None of the attempts above corrected the issue for me...
I then found this article on social MSDN https://social.msdn.microsoft.com/Forums/office/en-US/5287c51b-46d0-4a79-baad-ddde36af4885/visual-studio-cant-find-windows-81-sdk-when-trying-to-build-vs2015?forum=visualstudiogeneral
Finally what resolved the issue for me was:
Uninstalling and reinstalling VS2015.
Locating my installed "Windows Software Development Kit for Windows 8.1" and running the repair.
Checked my "C:\Program Files (x86)\Microsoft SDKs\Windows Kits\8.1" to verify the "DesignTime" folder was in fact there.
Opened VS created a Win32 Console application and comiled with no errors or issues
I hope this saves anyone else from almost 3 full days of frustration and loss of productivity.
Grep the folder tree's *.vcxproj files. Replace <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> with <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> or whatever SDK version you get when you update one of the projects.
For me in the Project Properties Settings General->Target Platform -> Change Windows 8.1 to Windows 10 solved the issue
Install the required version of Windows SDK or change the SDK version
in the project property pages
or
by right-clicking the solution and selecting "Retarget solution"
If you do visual studio guide, you will resolve the problem.
I encountered this issue while trying to build an npm project. It was failing to install a node-sass package and this was the error it was printing. I solved it by setting my npm proxy correctly so that it could reach the npm repo
PROBLEM: I ONLY get this compile-time "Windows SDK version 8.1 not found" error ( and a few other very-hard-to-resolve-nuisance errors -- cannot list them all ) when I export a project from an old version of MS Visual Studio (VS) to the new MS VS (2017), using the new MS VS export/"One-way Upgrade" feature.
SOLUTION: I have since learned to not use this export/upgrade feature and instead just create the new project from scratch -- using all my old source files, of course. Only my project settings have to be rebuilt, to be clear.
This is a bit of a pain, and a shame the export/upgrade feature won't work properly like it used to, but this is is actually easier and faster in the long run. MUCH better than working through a list of spurious errors that really should not have arisen in the first place.
Hope this helps...

i have installed the Visual Studio 2015, but there is no C++ Project.?

I am facing problem, I want to write c++ code in visual studio 2015, but I can't create c++ project because there is no c++ template in the New Project window.
I am creating new project in this way
File > New > Project > Visual C++
but there is no c++ template. Please help
The VS2015 installer does not install C++ by default.
Since you already have Visual Studio installed, you can modify the existing install.
On Control Panel->Programs and Features (or run appwiz.cpl) find and run the Installer for Visual Studio 2015.
Wait for Installer dialog to load.
Click the Modify button on the bottom of the installer dialog.
On the Features Tab, expand Programming Languages.
Select Visual C++.
Click the UPDATE button on the bottom right.
That should do it. You may have to insert the install media or suffer through a download, but these days Windows caches the installer info so everything needed may already be present on your system.
Go to the online menu (it's below Recent and Installed. There you'll be able to download C++ templates and samples. See this MSDN article which describes it in greater details.
While most users will be unblocked by the accepted solution, there is another scenario where Visual C++ is not working as intended for VS2015.
I was installing both VS2015 and VS2017 on the same system on the same day. Long story short, I got this person's problem.
From the link:
I am also running into this -- but in my case, I also installed full
VS2015 Pro. It shows that the VC++ common tools are installed, but
they are not on disk in the usual location, they seem to be in the
MSVS/Shared folder (Program Files (x86)/Microsoft Visual
Studio/Shared/14.0/VC/bin/cl.exe reports version 19.00.124218.2).
Uninstalling VS2015 removes these, and reinstalling puts them back in
Shared.
For me at least, it goes worse than just the batch files -- I can't
actually create any C++ projects. Trying to create one just causes the
"New Project" window to pop up again; no error, no warning.
No amount of uninstalling components from both 2015 or 2017 got me
into a usable state (Shared\14.0\VC still persisted as the install
dir, I couldn't find what component was keeping those tools on-disk
and preventing them from being removed). I ended up just copying the
contents of "Microsoft Visual Studio/Shared/14.0" into the "Microsoft
Visual Studio 14.0" folder -- a gross hammer, and VS2015 still can't
create C++ projects, but it got me unstuck, and existing build systems
started finding tools again.
VS team -- I totally get the goals of the layout change, and I love
what you guys are doing with VS overall. But please treat this as a
major bug; you can't decide to permanently change the location of
build tools that have been in one place for multiple years, as it will
break many, many existing build systems. At best, install them in both
locations; let VS2015 manage the "Visual Studio 14.0/VC" dir like it
always has, and let VS2017 manage the Shared/14.0 dir (via the "VS2015
C++ build tools" package). They should be unrelated.
Fix:
Uninstall all copies of Visual Studio
If you have frameworks that can install copies or partial copies of Visual Studio, or rely on them, consider uninstalling them too. For me, this was a couple versions of Qt.
Nuke C:\Windows\Temp and %temp%
Nuke anything visual studio related in C:\PROGRA~1,2,3, %appdata%, and %localappdata%
Reboot
Install the oldest version of Visual Studio you want to use first
Try to build a C++ Win32 console app with that version
If you can do that, you're unblocked. Otherwise, yikes! I don't know what to do next short of a full registry deep-dive keyword purge or a re-install of Windows. With an SSD, the latter is probably faster TBH.

how to get VS2013 c++ compiler to use with Qt without installing VS2013 [duplicate]

As per the title. I don't want to download the entire Visual C++ installer, only "cl.exe" and the other programs required for compiling and linking C++ programs on Windows.
As said, there is no way to do that. You need to download the entire 4-6GB+ bundle. MS deployment is a botch.
There is no need, however, to actually install everything. If you're up to some manual installation, you can extract individual components from the bundle and put them all in a more organized directory tree.
For example, I've found the following set to be the bare minimum needed for using the current MSVC2013 compilers in a x86 environment:
vc_compilerCore86.msi: MSVC toolchain;
vc_compilerCore86res.msi: MSVC toolchain MUI resources;
vc_librarycore86.msi: MSVC library stuff;
vc_LibraryDesktopX86.msi: More MSVC library stuff;
Windows Software Development Kit for Windows Store Apps-x86_en-us.msi: Windows SDK files and related tools (rc.exe, mt.exe, etc.);
Windows Software Development Kit-x86_en-us.msi: More Windows SDK files (specifically, WinSock2.h, WS2_32.lib, maybe others).
Remember that you can extract the contents of a MSI file by running msiexec /a <msifile> TARGETDIR="<path>" (jot a /quiet parameter if you're batching). Of course, you can also put more into your package by investigating the MSI files inside the bundle. In particular, the above set is missing the latest MSBuild tools, since I don't care for them. Stuff is often scattered around between multiple MSIs cluelessly, so good luck.
I've got a 50MB (!!!) 7z-file containing this set for local deployment, though I cannot share this publicly due to Microsoft licensing restrictions.
UPDATE:
This is the list of MSI files for MSVC2015 tools, headers and libraries:
packages\VisualC_D14\VC_Tools.Core\VC_Tools.Core.msi
packages\VisualC_D14\VC_Tools.Core.Res\VC_Tools.Core.Res.msi
packages\VisualC_D14\VC_Tools.X86.Base\VC_Tools.X86.Base.msi
packages\VisualC_D14\VC_Tools.X86.Base.Res\VC_Tools.X86.Base.Res.msi
packages\VisualC_D14\VC_Tools.X86.Nat\VC_Tools.X86.Nat.msi
packages\VisualC_D14\VC_Tools.X86.Nat.Res\VC_Tools.X86.Nat.Res.msi
packages\VisualC_D14\VC_Tools.X86.X64\VC_Tools.X86.X64.msi
packages\VisualC_D14\VC_Tools.X86.X64.Res\VC_Tools.X86.X64.Res.msi
packages\VisualC_D14\VC_PremTools.X86.Base\VC_PremTools.X86.Base.msi
packages\VisualC_D14\VC_PremTools.X86.Base.Res\VC_PremTools.X86.Base.Res.msi
packages\VisualC_D14\VC_PremTools.X86.Nat\VC_PremTools.X86.Nat.msi
packages\VisualC_D14\VC_PremTools.X86.Nat.Res\VC_PremTools.X86.Nat.Res.msi
packages\VisualC_D14\VC_PremTools.X86.X64\VC_PremTools.X86.X64.msi
packages\VisualC_D14\VC_PremTools.X86.X64.Res\VC_PremTools.X86.X64.Res.msi
packages\VisualC_D14\VC_CRT.Headers\VC_CRT.Headers.msi
packages\VisualC_D14\VC_CRT.X86.Desktop\VC_CRT.X86.Desktop.msi
packages\VisualC_D14\VC_CRT.X86.Store\VC_CRT.X86.Store.msi
packages\VisualC_D14\VC_CRT.X64.Desktop\VC_CRT.X64.Desktop.msi
packages\VisualC_D14\VC_CRT.X64.Store\VC_CRT.X64.Store.msi
packages\VisualC_D14\VC_CRT.Redist.Res\VC_CRT.Redist.Res.msi
packages\VisualC_D14\VC_CRT.Redist.X86\VC_CRT.Redist.X86.msi
packages\VisualC_D14\VC_CRT.Redist.X64\VC_CRT.Redist.X64.msi
packages\VisualC_D14\VC_ATL.Headers\VC_ATL.Headers.msi
packages\VisualC_D14\VC_ATL.X86\VC_ATL.X86.msi
packages\VisualC_D14\VC_ATL.X64\VC_ATL.X64.msi
packages\VisualC_D14\VC_MFC.Headers\VC_MFC.Headers.msi
packages\VisualC_D14\VC_MFC.X86\VC_MFC.X86.msi
packages\VisualC_D14\VC_MFC.X64\VC_MFC.X64.msi
packages\VisualC_D14\VC_PGO.Headers\VC_PGO.Headers.msi
packages\VisualC_D14\VC_PGO.X86\VC_PGO.X86.msi
packages\VisualC_D14\VC_PGO.X64\VC_PGO.X64.msi
packages\Win10_UniversalCRTSDK\Universal CRT Headers Libraries and Sources-x86_en-us.msi
And this is the list of MSI files for WinSDK10 tools, headers and libraries (downloaded separately):
Installers\Windows SDK Desktop Headers Libs Metadata-x86_en-us.msi
Installers\Windows SDK Desktop Tools-x86_en-us.msi
Installers\Windows SDK for Windows Store Apps Headers Libs-x86_en-us.msi
Installers\Windows SDK for Windows Store Apps Tools-x86_en-us.msi
All of this include stuff for both x86 and x64 (I haven't considered ARM or IA64). Both bundles compressed with LZMA will yield a 185MB file.
Locked. There are disputes about this answer’s content being resolved at this time. It is not currently accepting new interactions.
In 2014 you could not download the Visual C++ compiler alone from Microsoft.
It used to be that you could. Then it used to be that you could get it in the Platform SDK. Then you could only get it by installing Visual Studio.
Happily, at that time, the compiler that was bundled with Visual Studio Express for Desktop (the free version of Visual Studio at the time) was, and is, the very same that you get with Professional or Universal editions.
In November 2015 Microsoft again started providing the compiler tools in a free-standing package called the Visual C++ Build Tools.
Microsoft writes:
” the C++ Build Tools installer will not run on a machine with Visual Studio 2015 already installed on it. The reverse (i.e. upgrade to Visual Studio) is supported.
The long term situation is, as always, unclear. And, disclaimer: I have not used the build tools myself – I would have to uninstall Visual Studio first.
I ended up using Chocolatey, which has a package for Visual C++ Build Tools.
This command:
choco install visualcpp-build-tools
will install the latest 2017 version, but you can select one of the older versions, which include the 2015 release.
After the installation Visual Studio 2017 folder is added to the Programs menu. It includes shortcuts to various developer command prompts with cl.exe and other tools in the path.
As of 2019 Microsoft offers Visual Studio Build Tools which only includes the compiler, build tools and SDK. It's hidden in the all downloads list.
Update: The Visual C++ 2015 Build Tools are located here: http://landinghub.visualstudio.com/visual-cpp-build-tools
The Visual C++ 2017 Build Tools are now part of the regular VS 2017 installer. Just select the workloads you need. Information is on the same page.
This link is preferred to the blog links below as it's the official landing page and will be kept up-to-date.
I'm on the C++ team. If you have any questions about using the VC++ Build Tools or about MSVC in general, feel free to email me. My email is my StackOverflow user name #microsoft.com.
Once I tried to do same this as you. But MS doesn't provide isolated compiler. So if you need MS C++ compiler you must need to install the VS. But if you like to adventure. there is a tricky way to do that. Try it here.
Chrees!
You can use MSVC compiler without Visual Studio and the latest version is available here:
http://www.microsoft.com/en-us/download/details.aspx?id=41151
Also here's a website which details the command line options for the compiler:
http://msdn.microsoft.com/en-us/library/9s7c9wdw.aspx
As of the time of writing (June 23, 2021), the following info is taken from Configure VS Code for Microsoft C++.
Here is the important quote:
You can also install just the C++ Build Tools, without a full Visual
Studio IDE installation. From the Visual Studio Downloads page, scroll
down until you see Tools for Visual Studio under the All downloads
section and select the download for Build Tools for Visual Studio.
This will launch the Visual Studio Installer, which will bring up a
dialog showing the available Visual Studio Build Tools workloads.
Check the C++ build tools workload and select Install.
Note: You can use the C++ toolset from Visual Studio Build Tools along
with Visual Studio Code to compile, build, and verify any C++ codebase
as long as you also have a valid Visual Studio license (either
Community, Pro, or Enterprise) that you are actively using to develop
that C++ codebase.
As what stated in visual c++ 2015 tools for windows desktop
Mount your VS2015.iso
You can find all packages at your mounted location E:\packages | G:\packages
Navigate to Control Panel.
Right-Click at your VS2015 and choose change-modify
Check the Visual C++ boxes as stated in the link.
Click on Modify.
If installer fail to update, copy the mounted directory location and paste on it.
Click Retry button.
On March 21, 2022, the best I could figure out was to find the "Visual Studio Community" free download (required logging in with Microsoft account). There was no longer any "just give me the damn Build Tools" concept, but there is the promise that you just download an installer and then pick. So I downloaded the installer and ran it.
Of course, none of the top-level options are suitable for "just give me the damn Build Tools", so I pick the "Individual Components" option. This supplies an incredibly large list of things I don't want, but buried within it I find "MSVC v143 - VS 2022 C++ x64/x86 build tools (Latest)" which looks hopeful. I check that box and I'm informed they will give me also "Visual Studio code editor".
I'm sternly warned that I'm installing "without workloads", which seems to be some additional crap that the "Visual Studio core editor" I'm never going to use wants. I decline the additional bloatware. Some gigabytes later, it says I'm "Done installing" but warns "We recommend rebooting soon to clean up any remaining files."
After decades of (re-)writing scripts to locate the Microsoft compiler, I bow to Microsoft's superior ability to keep breaking any easy method of automating this process. Whenever I install the Microsoft compiler on a system, I manually set a system-wide environment variable that points to the Microsoft batch file for setting shell environment variables for the tools. Today's machine is a no-license (hey, Microsoft sucks the same way, just not as much!) Windows 10, and that is <Winkey>-x | System | Advanced System settings | Environment Variables
I create a variable called RLBVCVARS and set it to (in this particular case) c:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat My portable Windows dev environment keeps an alias that points to that so, I can mostly pretend Microsoft doesn't constantly introduce breaking changes to their installation schemes. I think you have to reboot for a "system" environment variable to take effect, but hey, Microsoft wants you to reboot after installing anything anyway, so no biggy.
First compile says can't find "io.h". Back to the installer. Let's try adding "Windows 10 SDK" (3 versions to choose from!). A GB or so later, I have an io.h and can build my current project. Onward and upward.

Can I download the Visual C++ Command Line Compiler without Visual Studio?

As per the title. I don't want to download the entire Visual C++ installer, only "cl.exe" and the other programs required for compiling and linking C++ programs on Windows.
As said, there is no way to do that. You need to download the entire 4-6GB+ bundle. MS deployment is a botch.
There is no need, however, to actually install everything. If you're up to some manual installation, you can extract individual components from the bundle and put them all in a more organized directory tree.
For example, I've found the following set to be the bare minimum needed for using the current MSVC2013 compilers in a x86 environment:
vc_compilerCore86.msi: MSVC toolchain;
vc_compilerCore86res.msi: MSVC toolchain MUI resources;
vc_librarycore86.msi: MSVC library stuff;
vc_LibraryDesktopX86.msi: More MSVC library stuff;
Windows Software Development Kit for Windows Store Apps-x86_en-us.msi: Windows SDK files and related tools (rc.exe, mt.exe, etc.);
Windows Software Development Kit-x86_en-us.msi: More Windows SDK files (specifically, WinSock2.h, WS2_32.lib, maybe others).
Remember that you can extract the contents of a MSI file by running msiexec /a <msifile> TARGETDIR="<path>" (jot a /quiet parameter if you're batching). Of course, you can also put more into your package by investigating the MSI files inside the bundle. In particular, the above set is missing the latest MSBuild tools, since I don't care for them. Stuff is often scattered around between multiple MSIs cluelessly, so good luck.
I've got a 50MB (!!!) 7z-file containing this set for local deployment, though I cannot share this publicly due to Microsoft licensing restrictions.
UPDATE:
This is the list of MSI files for MSVC2015 tools, headers and libraries:
packages\VisualC_D14\VC_Tools.Core\VC_Tools.Core.msi
packages\VisualC_D14\VC_Tools.Core.Res\VC_Tools.Core.Res.msi
packages\VisualC_D14\VC_Tools.X86.Base\VC_Tools.X86.Base.msi
packages\VisualC_D14\VC_Tools.X86.Base.Res\VC_Tools.X86.Base.Res.msi
packages\VisualC_D14\VC_Tools.X86.Nat\VC_Tools.X86.Nat.msi
packages\VisualC_D14\VC_Tools.X86.Nat.Res\VC_Tools.X86.Nat.Res.msi
packages\VisualC_D14\VC_Tools.X86.X64\VC_Tools.X86.X64.msi
packages\VisualC_D14\VC_Tools.X86.X64.Res\VC_Tools.X86.X64.Res.msi
packages\VisualC_D14\VC_PremTools.X86.Base\VC_PremTools.X86.Base.msi
packages\VisualC_D14\VC_PremTools.X86.Base.Res\VC_PremTools.X86.Base.Res.msi
packages\VisualC_D14\VC_PremTools.X86.Nat\VC_PremTools.X86.Nat.msi
packages\VisualC_D14\VC_PremTools.X86.Nat.Res\VC_PremTools.X86.Nat.Res.msi
packages\VisualC_D14\VC_PremTools.X86.X64\VC_PremTools.X86.X64.msi
packages\VisualC_D14\VC_PremTools.X86.X64.Res\VC_PremTools.X86.X64.Res.msi
packages\VisualC_D14\VC_CRT.Headers\VC_CRT.Headers.msi
packages\VisualC_D14\VC_CRT.X86.Desktop\VC_CRT.X86.Desktop.msi
packages\VisualC_D14\VC_CRT.X86.Store\VC_CRT.X86.Store.msi
packages\VisualC_D14\VC_CRT.X64.Desktop\VC_CRT.X64.Desktop.msi
packages\VisualC_D14\VC_CRT.X64.Store\VC_CRT.X64.Store.msi
packages\VisualC_D14\VC_CRT.Redist.Res\VC_CRT.Redist.Res.msi
packages\VisualC_D14\VC_CRT.Redist.X86\VC_CRT.Redist.X86.msi
packages\VisualC_D14\VC_CRT.Redist.X64\VC_CRT.Redist.X64.msi
packages\VisualC_D14\VC_ATL.Headers\VC_ATL.Headers.msi
packages\VisualC_D14\VC_ATL.X86\VC_ATL.X86.msi
packages\VisualC_D14\VC_ATL.X64\VC_ATL.X64.msi
packages\VisualC_D14\VC_MFC.Headers\VC_MFC.Headers.msi
packages\VisualC_D14\VC_MFC.X86\VC_MFC.X86.msi
packages\VisualC_D14\VC_MFC.X64\VC_MFC.X64.msi
packages\VisualC_D14\VC_PGO.Headers\VC_PGO.Headers.msi
packages\VisualC_D14\VC_PGO.X86\VC_PGO.X86.msi
packages\VisualC_D14\VC_PGO.X64\VC_PGO.X64.msi
packages\Win10_UniversalCRTSDK\Universal CRT Headers Libraries and Sources-x86_en-us.msi
And this is the list of MSI files for WinSDK10 tools, headers and libraries (downloaded separately):
Installers\Windows SDK Desktop Headers Libs Metadata-x86_en-us.msi
Installers\Windows SDK Desktop Tools-x86_en-us.msi
Installers\Windows SDK for Windows Store Apps Headers Libs-x86_en-us.msi
Installers\Windows SDK for Windows Store Apps Tools-x86_en-us.msi
All of this include stuff for both x86 and x64 (I haven't considered ARM or IA64). Both bundles compressed with LZMA will yield a 185MB file.
Locked. There are disputes about this answer’s content being resolved at this time. It is not currently accepting new interactions.
In 2014 you could not download the Visual C++ compiler alone from Microsoft.
It used to be that you could. Then it used to be that you could get it in the Platform SDK. Then you could only get it by installing Visual Studio.
Happily, at that time, the compiler that was bundled with Visual Studio Express for Desktop (the free version of Visual Studio at the time) was, and is, the very same that you get with Professional or Universal editions.
In November 2015 Microsoft again started providing the compiler tools in a free-standing package called the Visual C++ Build Tools.
Microsoft writes:
” the C++ Build Tools installer will not run on a machine with Visual Studio 2015 already installed on it. The reverse (i.e. upgrade to Visual Studio) is supported.
The long term situation is, as always, unclear. And, disclaimer: I have not used the build tools myself – I would have to uninstall Visual Studio first.
I ended up using Chocolatey, which has a package for Visual C++ Build Tools.
This command:
choco install visualcpp-build-tools
will install the latest 2017 version, but you can select one of the older versions, which include the 2015 release.
After the installation Visual Studio 2017 folder is added to the Programs menu. It includes shortcuts to various developer command prompts with cl.exe and other tools in the path.
As of 2019 Microsoft offers Visual Studio Build Tools which only includes the compiler, build tools and SDK. It's hidden in the all downloads list.
Update: The Visual C++ 2015 Build Tools are located here: http://landinghub.visualstudio.com/visual-cpp-build-tools
The Visual C++ 2017 Build Tools are now part of the regular VS 2017 installer. Just select the workloads you need. Information is on the same page.
This link is preferred to the blog links below as it's the official landing page and will be kept up-to-date.
I'm on the C++ team. If you have any questions about using the VC++ Build Tools or about MSVC in general, feel free to email me. My email is my StackOverflow user name #microsoft.com.
Once I tried to do same this as you. But MS doesn't provide isolated compiler. So if you need MS C++ compiler you must need to install the VS. But if you like to adventure. there is a tricky way to do that. Try it here.
Chrees!
You can use MSVC compiler without Visual Studio and the latest version is available here:
http://www.microsoft.com/en-us/download/details.aspx?id=41151
Also here's a website which details the command line options for the compiler:
http://msdn.microsoft.com/en-us/library/9s7c9wdw.aspx
As of the time of writing (June 23, 2021), the following info is taken from Configure VS Code for Microsoft C++.
Here is the important quote:
You can also install just the C++ Build Tools, without a full Visual
Studio IDE installation. From the Visual Studio Downloads page, scroll
down until you see Tools for Visual Studio under the All downloads
section and select the download for Build Tools for Visual Studio.
This will launch the Visual Studio Installer, which will bring up a
dialog showing the available Visual Studio Build Tools workloads.
Check the C++ build tools workload and select Install.
Note: You can use the C++ toolset from Visual Studio Build Tools along
with Visual Studio Code to compile, build, and verify any C++ codebase
as long as you also have a valid Visual Studio license (either
Community, Pro, or Enterprise) that you are actively using to develop
that C++ codebase.
As what stated in visual c++ 2015 tools for windows desktop
Mount your VS2015.iso
You can find all packages at your mounted location E:\packages | G:\packages
Navigate to Control Panel.
Right-Click at your VS2015 and choose change-modify
Check the Visual C++ boxes as stated in the link.
Click on Modify.
If installer fail to update, copy the mounted directory location and paste on it.
Click Retry button.
On March 21, 2022, the best I could figure out was to find the "Visual Studio Community" free download (required logging in with Microsoft account). There was no longer any "just give me the damn Build Tools" concept, but there is the promise that you just download an installer and then pick. So I downloaded the installer and ran it.
Of course, none of the top-level options are suitable for "just give me the damn Build Tools", so I pick the "Individual Components" option. This supplies an incredibly large list of things I don't want, but buried within it I find "MSVC v143 - VS 2022 C++ x64/x86 build tools (Latest)" which looks hopeful. I check that box and I'm informed they will give me also "Visual Studio code editor".
I'm sternly warned that I'm installing "without workloads", which seems to be some additional crap that the "Visual Studio core editor" I'm never going to use wants. I decline the additional bloatware. Some gigabytes later, it says I'm "Done installing" but warns "We recommend rebooting soon to clean up any remaining files."
After decades of (re-)writing scripts to locate the Microsoft compiler, I bow to Microsoft's superior ability to keep breaking any easy method of automating this process. Whenever I install the Microsoft compiler on a system, I manually set a system-wide environment variable that points to the Microsoft batch file for setting shell environment variables for the tools. Today's machine is a no-license (hey, Microsoft sucks the same way, just not as much!) Windows 10, and that is <Winkey>-x | System | Advanced System settings | Environment Variables
I create a variable called RLBVCVARS and set it to (in this particular case) c:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat My portable Windows dev environment keeps an alias that points to that so, I can mostly pretend Microsoft doesn't constantly introduce breaking changes to their installation schemes. I think you have to reboot for a "system" environment variable to take effect, but hey, Microsoft wants you to reboot after installing anything anyway, so no biggy.
First compile says can't find "io.h". Back to the installer. Let's try adding "Windows 10 SDK" (3 versions to choose from!). A GB or so later, I have an io.h and can build my current project. Onward and upward.