Easiest way to create an empty (no generic source code generated) project in VS, 2017 or 2019, is with the
Windows Desktop Wizard. It lets you choose the type of project -- Console, traditional Win32 Desktop, DLL or static library -- with options to generate or not sample source code, as well as an option to use/not use precompiled headers.
File->New->Project.
Or start the process with CTRL+Shift+N.
In my VS 2017/2019 I also added an optional keyboard mapping for File.NewProject: CTRL+Shift+P, CTRL+Shift+N and set that for Global use.
Here's where the differences between the VS versions happen.
VS 2017 New Project Dialog:
---------------------------
Left-hand side, expand the Installed node, and then expand the Visual C++ node (if it isn't already). Select the Windows Desktop node and in the middle window you get various project types to select....Console App, Windows Desktop App, etc.
Select
Windows Desktop Wizard. The other options generate generic code for the selected app type.
VS 2017 chooses a project and solution name for you, and a location where the project files will be located. Change if you want or not.
Ok, about projects and solutions. In VS a project is a single app with all the source and resource files grouped together to create an executable, DLL, whatever.
A solution contains one or more projects. If you are creating an app that uses a custom DLL you create your solution would contain 2 (or more) project. The DLL project, and the DLL-using app project.
https://docs.microsoft.com/en-us/visualstudio/ide/solutions-and-projects-in-visual-studio?view=vs-2019
After selecting Windows Desktop Wizard and setting your solution/project names and location select OK.
Windows Desktop Project dialog. Here is where you set the type of app you want to create, Console App is default in the pull-down. Check
Empty project and UN-check
Precompiled header. Select OK.
I really, really, REALLY recommend you not use precompiled headers. Precompiled headers can create more compile-time head-aches than they solve. For most projects precompiled headers don't save much time, if any.
VS 2017 hints you can use the Empty Project template to create an empty Console project. And only when choosing a Console project.
The Empty Project template is under the Other node under Visual C++, and bypasses the project wizard selection step(s).
If you are planning on having most of your projects be C++ console apps, I'd recommend using the Empty Project template.
After selecting OK VS 2017 creates the files and folders needed for your project.
If you created an empty project you can now add pre-existing source files to the project hierarchy. Or add new, blank, source files as needed.
VS 2019 Create a new project Dialog:
------------------------------------
Left side of the dialog is your Recent project templates section. The right hand side is where you choose the type of project you want to create.
If you want an empty Console app, choose the Empty Project template.
If you want to create an empty project of another type (Win32 API for example), choose the Windows Desktop Wizard template.
You now see the Configure your new project dialog. Letting you set the project/solution name and location.
Select Create and VS creates the empty project.
If you selected the Windows Desktop Wizard hitting Create brings up the Windows Desktop Project dialog. Select the project type from the pull-down menu (Console is default), check Empty project and UN-check Precompiled header.
Select OK and VS 2019 creates your shiny new no source code project.