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

This topic is 2635 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

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.

Share on other sites
You just have to check that tickbox when creating a new project. Then create your main.cpp and you are ready to go.

Share on other sites
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.

Share on other sites

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!

1. 1
2. 2
Rutin
19
3. 3
khawk
18
4. 4
A4L
14
5. 5

• 12
• 16
• 26
• 10
• 44
• Forum Statistics

• Total Topics
633767
• Total Posts
3013737
×