TFS 2018 build fails: cannot open include file 'afxres.h' - c++

We are testing a new new TFS 2018 SP1 server.
I was previously building a solution (4.5) which contains two unmanaged C++ projects originally written against the 2012 toolset.
Building that solution as-is on the new server worked fine. However, we have decided to retarget to 4.7.1 for our next release.
After making all the changes in the projects including targeting the 4.7.1 framework and the 2017 toolset (141), these projects fail to build with the error in the title.
I know this has to do with the C++ MFC/ATL redist.
The build server does not have VS 2017 installed and I do not want to install it unless absolutely necessary.
I did install the VS 2017 C++ redists x86 and x64 but it did not correct this.
Can anyone help me on that?

You need to at least install Build Tools for Visual Studio 2017 on your build server.
Build Tools for Visual Studio 2017
These Build Tools allow you to build native and managed MSBuild-based
applications without requiring the Visual Studio IDE. There are
options to install the Visual C++ compilers and libraries, MFC, ATL,
and C++/CLI support, and .NET and .NET Core support.
If that still not work, I'm afraid that you have to install the VS 2017 on the build server. (Note that do not miss the feature Microsoft Foundation Classes for C++ .)
UPDATE:
Please double check if you missed the Microsoft.VisualStudio.Workload.VCTools workload on the build server. See Visual C++ build tools for details.
If missed , just try using below command to install it:
vs_buildtools.exe --add Microsoft.VisualStudio.Workload.VCTools

Related

X Visual Studio is missing necessary components. Please re-run the Visual Studio installer for the "Desktop development with C++" [duplicate]

My Flutter Doctor is saying:
Visual Studio - develop for Windows
X Visual Studio not installed; this is necessary for Windows development.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all
of its default components.
How can I fix this problem?
It's basically saying that if you want to develop your Flutter application for Windows you will need to install Visual Studio 2022 and while installing Visual Studio 2022 you will need to download this: Desktop development with C++
Also, you have to install the third link in this: Visual-studio
You could also get desktop development with the C++ tool after installing Visual Studio and then navigating to tool → Get tools and features → Desktop development with C++.
The error means install Visual Studio, and this is different from Visual Studio Code. It's an IDE from Microsoft.
For those who may be using a weak computer and can't afford to install the full Visual Studio, you only need to install a few components from Visual Studio to get Flutter to run on your computer without errors. These components are:
MSVC v142 - Visual Studio 2022 C++ x64/86 build tools.
Windows 10 SDK (for Windows 10 users)
C++ CMake tools for Windows.
In total, they should occupy around 8 GB or so.
As it states, you need to download Visual Studio (which is different from Visual Studio Code).
When installing it, remember to select the required package Desktop development with C++:
This will not prevent you from developing Mobile apps, but it's a requirement only for Windows Development.
Is unnecessary to install the "Desktop development with C++" if you don't want to develop desktop applications for Windows using Flutter.
If you only want to develop mobile apps using Flutter, you can run
flutter config --no-enable-windows-desktop
to disable the desktop support for your Flutter projects. After that, when you run the flutter doctor command again, you will no longer see the warning.
Read more at: https://fig.io/manual/flutter/config
Only two steps are required.
Install Visual Studio 2022 (Link: https://visualstudio.microsoft.com/downloads/)
Install Visual Studio Code (Link: https://code.visualstudio.com/)
Your code will run smoothly.
My solution was a bit simpler. Uninstall everything all build system's from VS. Then reinstall Visual Studio Community 2022, restart then try again. Might get a warning about nuget but it should fix the issue.
With the newest android installer "android-studio-2022.1.1.19-windows" there would be a jbr and jre folder existing, hence creating a link from jre to jbr would not work.
What you can do is copy the contents of the items in jbr into the jre folder and this would resolve the error.
Make sure to install Visual Studio Code.
Open the Visual Studio download page:

Visual C++ Compiler

Can I install standalone Microsoft Visual C++ Compiler on my Windows 8.1 x86 machine and how much data I need to download?
And how much data i need to download required files to install Visual Studio 2015 Build tools?
You can download the Build Tools without the IDE:
https://www.visualstudio.com/downloads/#build-tools-for-visual-studio-2017
https://www.microsoft.com/en-us/download/details.aspx?id=48159
Some details concerning the 2017 Build Tools:
These Build Tools allow you to build native and managed MSBuild-based applications without requiring the Visual Studio IDE. There are options to install the Visual C++ compilers and libraries, MFC, ATL, and C++/CLI support, and .NET and .NET Core support.
You can also follow the descriptions here: http://landinghub.visualstudio.com/visual-cpp-build-tools
can you please describe your question properly
According to your question
Yes you can install standalone Microsoft Visual C++ Compiler.
download required files to install Visual Studio 2015 Build tools? - 24mb of file
go to this link https://www.microsoft.com/en-in/download/confirmation.aspx?id=48159 for downloading

Opening VS 2012 C++ Project in VS 2015 gives Build error

We have a C++ Project built in VS 2012 (To generate .arx files to work with AutoCad 2014). Now we need to recompile it in VS 2015. we have not installed VS 2012. I opened the project in VS 2015. Properties -> General -> Platform toolset is set to Visual Studio 2015 (v140). Still we are getting "The build tools for v140 (Platform Toolset = 'v140') cannot be found. To build using the v140 build tools, please install v140 build tools."
we created a simple C++ Console application and ran it. Works fine no build error there.
Need to recompile the files for building .arx files to work in AutoCad 2018.
Initial Project Load :->
In the initial project load itself for Nimcad and planact we are getting build tools error. But not for engr.
Build on engr Project getting errors this might be the changes in ObjectARX 2018 I don't know. If you have a solution for this error please let us know:->
Buid on Nimcad Project :->
Build on Planact Project :->
For both Nimcad and planact all we get is build tools error.
Property Pages :
Any help please.
To build AutoCAD 2018 ObjectARX app you'll need Visual Studio 2015 Update 3 configured (by default) with VC14.0. As you are migrating a project, make sure to adjust all libraries (.lib files) to version 22. Did you download the ObjectARX 2018 SDK?
Update
This seems a problem with your Visual Studio installation. If you create a new C++ project, VS should also ask you to install the missing parts.
In Visual Studio 2015 (...) the C++ compiler, libraries, and project templates have been moved into an optional feature. (...) To install the various components needed for desktop and mobile development in C++, you must choose “Custom” and manually select those items (Visual C++ Team Blog)
You may need to re-run VS setup and select the C++ related parts (as already mentioned on the question comments).
Finally, check your VisualStudioVersion using the VS2015 Command Prompt:

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.