VS 2015 project configuration templates and their directories

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.