VS2010 - Where are <projectName>.cpp, stdafx.h, stdafx.cpp, targetver.h templates?

Started by
2 comments, last by mmakrzem 12 years, 6 months ago
Everytime I start a new project, Visual Studio 2010 creates the following five files for me:

stdafx.h
stdafx.cpp
targetver.h
<projectName>.cpp
ReadMe.txt


The first thing that I always do is I delete the ReadMe file, and then go through each of the remaining files and format the header and files to my liking.

I'd like to customize the header and source file templates so that they look the way that I like, rather than what the defaults give me.

Does anyone know where VS gets these files from so that I can modify them?
Also I'd like to know if there is a way to tell VS not to ever create the ReadMe file so that I don't have to take the time to delete it every time I create a new project.
Advertisement
I can't really answer your question, but what about creating an empty project?
You just have to check that tickbox when creating a new project. Then create your main.cpp and you are ready to go.
They're at for the generic win32 app or win32 console app:
%VSINSTALLDIR%\VC\VCWizards\AppWiz\Generic\Application\templates\1033

templates.inf controls which files are created, the content of the files is controlled by, well, the contents of the file.

You can find the locations of files for other templates by looking at the relative vsz files (just a renamed text file) under the \vcprojects\ directory.

They're at for the generic win32 app or win32 console app:
%VSINSTALLDIR%\VC\VCWizards\AppWiz\Generic\Application\templates\1033



Thanks that is exactly what I was looking for!

This topic is closed to new replies.

Advertisement