The establishment of the project more time, I would like to be able to configure a project template, after the establishment of the project automatically use this template is easy, do not have to change every time, each project must be changed!
After unremitting efforts, finally found the vs2015,vs2012 (I only use these two, other should be almost the method) of the location of the project template and change method, as follows:
VS menu, view, property Manager (your project), double-click "Microsoft.Cpp.Win32.user", pop-up property page, set VC + + directory inside. This setting is valid for all VC projects.
Its directory is located at: C:\Users\Administrator\AppData\Local\Microsoft\MSBuild\v4.0
(1-1)
(Fig. 1-1)
Each can be changed (perhaps you have more configuration), you can change:
Output directory, intermediate directory these two will automatically modify all the configuration (debug/release), the target file name is changed to the corresponding platform (win32/x64 ...), can not change the corresponding configuration, (1-2,1-3,1-4):
(Fig. 1-2)
(Fig. 1-3)
(Fig. 1-4)
Finally attach the files of my configuration to two:
Microsoft.Cpp.Win32.user.props
<?XML version= "1.0" encoding= "Utf-8"?><ProjectDefaultTargets= "Build"ToolsVersion= "4.0"xmlns= "http://schemas.microsoft.com/developer/msbuild/2003"> <ImportgroupLabel= "PropertySheets"> </Importgroup> <PropertyGroupLabel= "Usermacros"> <WIN32>1</WIN32> </PropertyGroup> <PropertyGroup> <OutDir>$ (SolutionDir) Build</OutDir> <IntDir>$ (SolutionDir) temp\$ (Configuration) _$ (Platform) _$ (ProjectName) \</IntDir> <TargetName>$ (ProjectName)</TargetName> <Includepath>e:\projects\c++\lzp_library;$ (Includepath)</Includepath> <LibraryPath>e:\projects\c++\lzp_library\build;$ (LibraryPath)</LibraryPath> </PropertyGroup> <ItemDefinitionGroup/> <ItemGroup> <BuildmacroInclude= "WIN32"> <Value>$ (WIN32)</Value> <environmentvariable>True</environmentvariable> </Buildmacro> </ItemGroup></Project>
Microsoft.Cpp.x64.user.props
<?XML version= "1.0" encoding= "Utf-8"?><ProjectDefaultTargets= "Build"ToolsVersion= "4.0"xmlns= "http://schemas.microsoft.com/developer/msbuild/2003"> <ImportgroupLabel= "PropertySheets"> </Importgroup> <PropertyGroupLabel= "Usermacros"/> <PropertyGroup> <OutDir>$ (SolutionDir) Build</OutDir> <IntDir>$ (SolutionDir) temp\$ (Configuration) _$ (Platform) _$ (ProjectName) \</IntDir> <TargetName>$ (ProjectName)</TargetName> <Includepath>e:\projects\c++\lzp_library;$ (Includepath)</Includepath> <LibraryPath>e:\projects\c++\lzp_library\build;$ (LibraryPath)</LibraryPath> </PropertyGroup> <ItemDefinitionGroup/> <ItemGroup> <BuildmacroInclude= "WIN32"> <Value>$ (WIN32)</Value> <environmentvariable>True</environmentvariable> </Buildmacro> </ItemGroup></Project>
Of course you can also let the configuration generated files to their own directory, after all, can not change the configuration of the generated file name, can only change the corresponding platform generated file name:
< OutDir >$ (SolutionDir) $ (Configuration)</OutDir>
And you can also define some common macro,,, and so on;
Well, it's easy to build a project in the future! ^_^
VS 2015 project configuration templates and their directories