How to install SDK for Visual Studio - c++

I can download the iso with the SDK but which of the many *.msi do I need for C++ projects with MFC? There seemingly is no general installer included which installs the SDK on the fly.

When I installed Visual Studio 2019 I opted for C++ and MFC development and I thought that the installation of the SDK is then automatic - but somehow it was not. I de-installed and re-installed Visual Studio and then made sure that the SDK-box was checked.
Problem solved. Thanks.

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:

Xamarin.Forms Cross-Platform templates missing on Visual Studio 2015 Professional

I have fresh install of Visual Studio 2015 Professional and after click on File - New Project - Templates - Visual C# - Cross Platform I don't get any usual templates like Blank app or Cross Platform App (Xamarin.Forms or Native). I had installed all available items during Visual Studio installation and would like to target iPhone, Android and WF platform in a same project.
How to install missing templates?
All features including Xamarin were selected during initial install of Visual Studio.
I solved the issue by performing a thorough Xamarin uninstall, then I installed it again through Visual Studio installer. Details and the exact 12 steps which helped me are described here:
https://developer.xamarin.com/guides/cross-platform/windows/visual-studio/troubleshooting/uninstall-xamarinvs/
After this I got all templates needed (iPhone, Android & Windows Phone). However, after recent update of Xamarin tools I noticed that Windows Phone project isn't added to the solution any more but replaced with Universal Windows Platform.

Can't change Windows SDK version in Visual Studio C++ project

I have a Visual Studio C++ console application that I created with Visual Studio 2015 and now I can't compile it (with Visual Studio 2017) because it is targeting the Windows 8.1 SDK, which is not installed. The problem is that I can't retarget the project to the Windows 10 SDK.
What happens is that when I open the project properties page and go to General - Target Platform I see the Windows 10 SDK in the dropdown, and I am able to select it... but as soon as I press Apply, it reverts back to 8.1 by itself. No error message is provided.
Visual Studio installer says that, indeed, the listed SDK version is installed:
So what's going on here? Is there a way to retarget my project without having to install the Windows 8.1 SDK?
Not sure if that matters but: this project is actually just a "wrapper" around an existing bare project consisting of just a bunch of .cpp and .h files, which was developed by another person. I'm really not familiar with C++ development.
After hours of struggling with this problem, I coincidentally discovered that selecting Project Properties/General, changing "Platform Toolset" to v141_xp (instead of v141) forcibly drops the Windows SDK Version to 8.1 or 7.0. I'm not sure how Visual Studio chooses which SDK to use.
EDIT: You must edit .vcxproj and change both:
<TargetPlatformVersion>10.0.17134.0</TargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>

manifest is picking predifined redist

i am developing a software using Visual C++ 2008 Express Edition. after build in release mode, i have made a setup file with latest redist 2008. the software is running in my PC fine. in my PC this redist are installed :
in my friends PC, the same redist are installed. but the software is crashing on my friends PC.
from the event log it shows:
as you can see, it is demanding 9.0.21022.8 version of redist whether there is previously installed latest version of redist(9.0.30729.17). so, i go for a google. from the internet, i edit my C:\Program Files\Microsoft Visual Studio 9.0\VC\include\crtassem.h
but it didn't help. then i check my project manifest. and i saw :
but i don't know how to edit manifest (i am new in VC++). and i also check C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\Microsoft.VC90.CRT.manifest. i shows:
i have tried to find out 9.0.21022.8 version of redist in the internet. but i have failed. from my VCExpress installer there is a file named vcredistmin_x86.exe :
as you can see the version of the file is 9.0.21022.8. i think this is the redist i need. but i cannot install it. it says "run the setup.exe file"
what can i do?
Edit(if i am asking two different answer from this question, please inform me. i will delete this edited part):
i am now wanting to deploy my project from Microsoft Visual studio 2008. i have uninstalled previous Microsoft Visual C++ 2008 express edition. but when i am trying to install Microsoft Visual studio 2008, it says
Installation Requirements:
A compatible version of Visual Studio 2008 was not detected on the
system. This update is designed for only the Microsoft Visual Studio
2008 (ENU) product family, and is not compatible with any Express
editions.
guys, have you any idea what to do?
From what I see this download is 9.0.21022.8: http://www.microsoft.com/en-us/download/details.aspx?id=29
I don't know about VS Express, in VS full version there are the vcredist_x86/x64/arm.exe available in the install directory (For VS2012: .../Microsoft Visual Studio 11.0\VC\redist\1033)
If it's acceptable for you, the simplest way to forget about this problems you can statically link with Runtime by changing your project properties: C/C++ -> Code Generation -> Runtime Library, select /MT or /MTd. Runtime library will be included into your executable so you won't have to install it on client machine.

Building ATL projects

I'm trying to build an ATL based project on a build server. For that I have installed latest Windows SDK, however getting an error:
"Cannot open include file: 'atlbase.h': No such file or directory".
I have checked and to my surprise SDK does not contain ATL anymore. I cannot neither refactor ATL out on this stage nor install a VS on the build server. What would be an extra set up to build ATL?
ATL / MFC is installed by VS so, if you can't install VS, perhaps you could install it somewhere then take the headers, libs and DLLs and install them manually on your build server. Bit messy but it should work.
I had the same problem lately. If you're using an Express edition of Microsoft Visual Studio, you can't use ATL. I know it sounds illogical, but I guess there's no way of doing that. Some MSDN guy told me that in the license file of Microsoft Visual Studio Express Editions, there's a line about that. ATL is not free, so you have to buy it, or use Pro editions of Microsoft Visual Studio.
In Microsoft Driver Dev Kit, there's ATL classes, but they give weird linking errors. So, I guess you have to use Microsoft Visual Studio 2008 Professional, or 2010 Professional.
I can help you more if there are more errors/problems about setting up ATL I guess.
Take care.