I installed the VS2017 community and I am lost: the Win32 Console Application in missing.
I don't even have template when I go to New Project and also I cannot create C++ Empty Project in VS2017.
How I can solve it?
Install all the optional tools for c++ development
then follow these steps ( Microsoft has updated its visual studio and there are some minor changes)
The new updated changed some things. Win32 Console Application is gone in the new update. Go to File -> New Project -> Visual C++ -> Windows Desktop -> Windows Desktop Wizard -> Application type: Console Application (.exe), Additional Options: Empty Project
Then have fun!
You just need to install "Visual Studio C++ core features". Don't install everything about C++. It consumes too much storage and possibly slow down your IDE.
Steps:
Open Visual Studio 2017 Installer.
Select "Individual Components" tab.
Select "Visual Studio C++ core features".
That's all.
If you are not interested in Game or Mobile C++ development you can remove your selections in "Workloads" tab to get free space in your hard drive :)
Related
My installed or something in my vs 2019 files screen shot
My installed or something in my vs 2019 files widen screen shot
i dont have templates or any win32 console application
pls help me im new to vs 2019
i only coded two applications ( Windows Form Application )
To install other templates, you can open the Visual Studio Installer (open by searching in the windows menu). Choose your VS installation, click more then modify.
Ensure the above option is ticked, then click modify at the bottom.
When you open VS, this is the project type you should make.
.Net Desktop Development
This would help you developing console apps on vs 2019
You could get to vs installer from "Tools>get tools and features"
I am on Visual Studio Community 2017 v. 15.3.1 and I can't seem to find Win32 console application or Win32 project. Still have empty c++ project template and Windows Console Application template.
On the start page, I still have win 32 console project available, but if I click it, I get a prompt about removing it from the list
EDIT: I have currently installed following Workloads:
Universal Windows Platform
Net desktop development
Desktop development with C++
Game Development with C++
Visual Studio extensions development
I've done no changes to workload configuration, save from adding a few extra components.
I've been fiddling with installer for a while but can't figure out which package I need for this. Any suggestions?
The new updated changed some things. Go to file -> new project -> visual c++ -> windows desktop -> windows desktop wizard -> select whatever you want
If you haven't installed C++ at all (doesn't come by default as mentioned above) look here
This seems to work. Credit all goes to the original website! :)
(https://developercommunity.visualstudio.com/content/problem/93159/cant-find-win32-console-application-for-new-projec.html )
If you are using Visual Studio 2017, and can't find "win32 console project" after File ->> New ->> Project:
(https://imgur.com/a/3mmgyP3 : VS 2017 "New Project" without "win32 console project" )
Go to File ->> New ->> Project ->> Windows Desktop Wizard ->> select "Empty Project"
VISUAL STUDIO 2015
(https://imgur.com/a/9H7sHfV : File ->> New ->> Project ->> "Win32 Console Application")
VISUAL STUDIO 2017
(https://imgur.com/a/5Qqzf1L : File ->> New ->> Project ->> "Windows Desktop Wizard")
When I installed vs2017, I did select Windows development with C++ option. After installation, however, I don't see the MFC has been added. Sure enough, I get errors when I compile my application,
fatal error C1083: Cannot open include file: 'afxwin.h': No such file or directory
I cannot find the Change/Modify option with my vs2017 installation in Control Panel. How can I add "Microsoft Foundation Classes for C++" package?
If you look near the top of the VS Installer window, you'll see Workloads, Individual Components and Language Packs.
At least as far as I can see, none of the "Workloads" will include MFC in your installation. To get it, you first have to click on "Individual Components", then scroll quite a ways down to get to the "SDKs, libraries and frameworks" section. In there, you'll find a list of components for ATL and MFC support:
In the VS 2019 installer, the list of possibilities has gotten even longer. There are versions for ARM, ARM64, and x86/x64 both with and without Spectre mitigations, for each of the 141 and 142 build sets:
That's not necessarily the end of the story though: by default, even when you install that, it only installs the version Unicode build of MFC. If you want the narrow-character version, you have to install that separately. I don't think there's any entry in the installer to do this at all--but if you try to build a project that uses narrow-character MFC, you'll get an error message that includes a link to download it.
In Windows 10 with Visual Studio 2017 Community Edition to modify the Visual Studio 2017 installation, I had to go into Settings from the Windows Start menu then in the search box enter "Apps & Features" to bring up the list of installed applications (just typing in "apps" was enough to bring it up in the list).
I then looked for Microsoft Visual Studio 2017 in the list of apps, clicked on that entry which then displayed the Modify button. Clicking on the Modify button will bring up the installer to allow you to modify the various components.
I have seen cases where the installer wants to do an Update of Visual Studio 2017 before allowing you to do the Modify action. Depends on the last time you used it and the last time you did an update.
So instead of a Modify button there may instead be an Update button.
Note: see also How to install (v142) Build tools in Visual studio which describes issues seen with install order when installing both VS 2017 and VS 2019.
The VS 2017 Modify dialog has three tabs, "Workloads", "Individual components", and "Language packs". Click on the "Individual components" then scroll down to the section titled "SDKs, libraries, and frameworks" which is the last section in my install. There should be an entry for "MFC and ATL support (x86 and x64)" with a checkbox near the end.
There is a lot of stuff available from this "Individual components" view of the "Modify installation" dialog.
Just to add a tip for VS 2019:
#Jerry Coffin's answer does a good job of laying out the explosion of MFC/ATL options in VS 2019. Since there are many options and each MFC pack is 1.1+GB, here is how to pick the right one.
Platform: Hopefully you know this :) but it is in project properties.
Version: For an existing project, it is found in the project properties under "Configuration Properties -> General -> Platform Toolset"
Below is a screenshot showing both (Win32=x86 in this case). In this case I needed "C++ MFC for v141 build tools (x86 & x64)":
You should use Visual Studio Installer to make changes.
To create an MFC project, you just need to select Win32 project/Win32 Console Application for your application type, and then click OK. In Application Wizard, click next, in Application Settings, check MFC under Add common header files for:.
I'm using VS 2015 Express for Desktop which doesn't have MFC Multibyte support by default.
Not long ago there was a separate MFC MBCS DLL Add-on.
But now link to Multibyte MFC Library for Visual Studio 2015 is removed.
That was done because all other VS editions have "Microsoft Foundation Classes for C++" optional install component:
But VS 2015 Express for Desktop lacks it (it has no optional install components, no "Custom" installation at all)
So the questions are:
Maybe someone has a backup link to the download Multibyte MFC Library for Visual Studio 2015?
I've also downloaded VS 2015 Community Edition ISO. In the \packages\VisualC_D14 there are several VC_MFC.* folders (VC_MFC.MBCS among them). But trying to run executables inside that folder leads to an error
Maybe someone knows howto install that components without running whole VS 2015 Community Edition setup?
Thank you in advance.
P.S. Installing VS 2015 Community Edition instead of VS 2015 Express for Desktop is not suitable for my company due to license limitations (we are enterprise organization - over 250 PCs - and use VS for commercial purposes).
Unfortunately changing the character set from multibyte to Unicode in our projects is also not an option for us now.
I have one solution for this. kindly follow the steps to add MFC for C++
step 1: close any Opened Visual Studio.
Step 2: open a Visual Studio and choose File->New -> Project
Step 3: In New Project Pop UP, Select Templates->Visual C++ -> MFC
Step 4: In the Listed Project/files, you will see "Install Microsoft
Foundation classes for C++". Double Click on it.
Step 5: "Install Missing Features" Popup Come with two Button
"Install and Cancel". Saying "Install Microsoft Foundation Classes
for C++. You Simple Click on "Install".
Step 6: Important "Close the opened VS" and you will see Visual
Studio Setup Wizard come with option "Microsoft Foundation Classes"
Within Features Tab. Just Click on "Next" and then a new Window
Appear click on "Update". Your MFC will start updating.
Step 7: Enjoy coding.....
As far as I see my installation the files are always installed if you install the MFC.
I just rechecked it on a different machine. The appropriate MBCS libs are installed by Default, when you choose MFC in the installation of VS-2015.
I try to ran a previous written MFC c++ code on my visual studio 2015 MFC with multitype MFC library installed.
However, I still have 12 errors here regarding missing function:
IntelliSense: cannot open source file "afxwin.h"
C1083 Cannot open include file: 'afxwin.h': No such file or directory
cannot open source file "afxext.h"/"afxdisp.h"/"afxdtctl.h"/"afxcmn.h"/afxdisp.h etc....
Where can I get these head files?
Again, my set up is:
VIsual studio 2015 ultimate MFC
Multibyte MFC library installed
Windows 8 - 64 bit machine
Thanks!
I just fixed a similar problem. Here's how you can resolve this.
Go to your control panel
Navigate to uninstall/change a program.
Scroll down until you see your visual studio installation
Click change
Once the window pops up, click "Modify"
Under Programming Languages -> Visual C++
Make sure "Microsoft Foundation Classes for C++" is checked. If it isn't select it and click update.
For VS2019 the above solutions didn't worked for me.
I had to go to "Installer -> Individual Components -> "
and install the following to solve the issue:
"MSVC v141 – VS 2017 C++ x64/x86 build tools (v14.16)"
"C++ MFC for v141 build tools (x86 & x64)"
"C++ ATL for v141 build tools (x86 & x64)"
For what it's worth. I was getting similar errors after a fresh installation of VS2017. I installed the C++ features from the main installer and created a new project with MFC checked. I assumed "Microsoft Foundation Classes for C++" was installed by this point, but I kept getting these errors. Furthermore, after saving and closing the solution for the first time, VS wouldn't load the project if I opened the solution from the recently used list because dependencies were missing.
What worked for me
I opened the solution file directly using VS2017. Finally, VS informed me that "Microsoft Foundation Classes for C++" was not installed and gave me the option to install it. I had previously looked through the installer features and could not find this option.
EDIT
Per Vladimir's comment below...
In 2017 Visual Studio Installer it ["Microsoft Foundation Classes for C++"] is under Modify / Individual Components / SDKs... / MFC and ATL support (x86 and x64)