Changes to Project Templates and Code Wizards in 15.3

Visual Studio 2017 Update 15.3 is a major release with many different improvements coming to the product. You can learn more about these changes in the 15.3 Release Notes. One aspect I want to highlight in this blog post pertains to changes made to the C++ templates in File > New Project and code wizards. We made these changes to account for feedback we received from you and to optimize the templates you use the most often.

Let’s start by looking at the New Project dialog in 15.2. Many of you will be familiar with the way everything is laid out. There are a number of different templates under Visual C++, including Win32, MFC (if you have that installed), and Test.

In 15.3, the dialog looks a bit different:

In order to make the templates more user-friendly and intuitive, we made the following changes:

The Win32 category has been renamed to Windows Desktop, and continues to contain the Win32 project templates.

The Win32 Console Application template has been renamed to Windows Console Application and no longer shows a wizard when creating a project.

The Win32 Project template has been renamed to Windows Desktop Application and it no longer displays a wizard.

If you do want to go through a wizard and configure your project from the get-go, you can choose the new Windows Desktop Wizard template:
This will display a simple single-step wizard:

The wizard allows you to choose your application type (Windows or Console EXE, DLL, or LIB), reference ATL or MFC libraries, choose whether you want to use a precompiled header or export symbols, or simply set up an empty project with nothing in it.

Note: If you want an empty project with no additional options, such as a precompiled header, consider using the Empty Project template instead (found under the Visual C++ node and the General sub-node), which does exactly the same thing, but does not require you to go through a wizard.

C++ Add Class Changes

The new wizard isn’t the only one to get a rework. We went through a number of different project and code wizards and updated them with a more modern WPF-based user interface. The Add Class wizard (accessible from the right-click context menu in Solution Explorer) is a notable example. This would bring up a lot of complicated looking set of templates. As an example, if you click on the ATL tab alone, this is what you would get:
If you click on Visual C++ or its C++ sub-category however, the only option available there is C++ Class. And naturally, this is the option most people care about. So rather than make you go through this extra step just to add a simple, generic C++ class, Add > Class launches the Add Class Wizard directly.
If you want to access the other templates, simply do Add > New Item instead.

Hmm, that is strange. On my machine it’s showing just fine. When you go to Help > About Visual Studio, is the listed version 15.3.0? If so, you can file a bug about this here: https://developercommunity.visualstudio.com/

It would have been nice to cleanup the templates themselves at the same time. Does anyone really need a readme.txt file in their project? Or a file comment such as “// ConsoleApplication4.cpp : Defines the entry point for the console application.”? Probably not.

And a nit: it’s “OK” in virtually all Microsoft UI products. Where did “Ok” come from?!

The windows desktop project wizzie has black boxes on a dark gray background in high contrast screen mode. In other words, more of the same Microsoft doing windows with color clashing all over the place. again. still.

Had to go hunting to find out how to do static lib, something obvious the old way. I will continue hunting for a while, I am sure, when things are hidden down a couple of levels. This is not progress. <– attention

Can you change the default compiler warning level for new projects from from 3 to 4?

For years, Microsoft’s own page on compiler warning levels has been recommending “for a new project, it may be best to use /W4 in all compilations; this will ensure the fewest possible hard-to-find code defects.”, and I’ve lost track of the number of bugs I’ve found just by making this change. Why not do it for us and spare us the bother?

Unfortunately, changing the default level from 3 to 4 is a breaking change that a number of developers won’t be able to tolerate. I sympathize, but our hands are tied from a compatibility point of view.

IMHO, anyone who has a real problem with this could just change the setting back easily enough, and then all of the truly new projects would benefit from the stricter warnings.

But you really do need to clean up your system headers to a minimum of /W4, and preferably /Wall…or else do as the linked suggestion says and provide a way to specify that headers within particular paths get a reduced warning level. Until then, the higher warning levels are of very limited utility.

I seem to recall STL (the person) posting on here that he’d cleaned up the STL headers to a higher warning level, which seems like a good first step.

“If you want an empty project with no additional options, such as a precompiled header, consider using the Empty Project template instead”
I have tried using the empty project template in the past, but I normally have to do a bit more configuration than if I use the desktop application wizard and choose empty project there. For some reason, the defaults just don’t seem to be quite right for anything not to mention having to change the subsystem and/or project type that automatically gets set with the desktop application template.
Well, I’m just glad you haven’t removed that template.

I think the wizards are just too raw for 2017. We’ve had RAD tools for at least two decades and VC++ can only do a one-time boost, generating a bunch of code that you’ll have to maintain by hand afterwards.

I have just tested a couple of wizards and two of them generated code that won’t compile. The MFC wizards will happily reference resources that don’t exist (MFC comes with localization for only five or so languages) and one ATL control/object wizard (I can’t check it right now which one) references undefined IDs (am I supposed to create them by myself or is this a bug?).

I know VC++ is not for the faint of heart, but it doesn’t need to be so unfriendly. It works fine for code-only (no GUI or third-party GUI) projects, though.

Can you give me a bit more specifics into what you did so that I can investigate? Namely:
– Which wizard did you use.
– If you used a project item, what kind of project you had beforehand.
– What options did you select on the wizard.
– Anything else that you think would help us reproduce the issue.

I know a couple of issues with the ATL dialogs were fixed which sound similar from what you mention but I’d like to validate that it’s the same issue you’re reporting.

Hey, thanks for your attention. It may take a week or two before I can play with VS 2017 again and re-open that toy project, but when I do, I’ll report back. Keep in mind that I’m a total noob regarding Windows-specific C++ APIs, so I may be missing something very obvious.

I did a fresh install of Visual Studio Enterprise 15.3.4 and there are no UWP templates for Visual C++. Also when I load a C++ UWP Project created with a previous VS2017 Version it fails to load with the error that some Installation components are missing and I should install “Microsoft.VisualStudio.ComponentGroup.UWP.VC” which I could not figure out how to do.
I remember on my other machine Visual Studio asked me if I want to download this package when I used the C++ UWP Project template but this does not work now as it does not exist on the new Installation.
Any ideas?
Thanks.

Hello schlzber, did you install the Universal Windows Platform workload by any chance through the VS installer? You’ll want that in order to work with UWP projects. To open the Visual Studio installer, you can search for it in Windows search or go to File > New Project and click “Open Visual Studio Installer” in the bottom left.

Once you have the installer open, check the Universal Windows Platform Development workload at the top, then check “C++ Universal Windows Platform tools” on the right-side, click Modify and you’re done!

Hello, Visual Studio Team!
Are you going to integrate that new wizard “model” into Visual Studio SDK?
Or at least prepare an article/guide on how to use existing framework (it’s Microsoft.VC.Wizards, right?) to create our own wizards?
Any plans about this?