修改 VS2010 项目属性的默认包含路径

来源:互联网 发布:炉石传说盒子 mac 3.0 编辑:程序博客网 时间:2024/05/29 01:54
Visual C++ 2010 中 “VC++目录”设置被移到了每个项目的项目属性上,这样每次新建一个DirectX的项目时,都需要在项目属性中添加DirectX的包含目录和库目录,重复做同样的事情实在不爽,其实可每次新建项目时默认包含该目录,方法:
打开 C:\Users\Administrator\AppData\Local\Microsoft\MSBuild\v4.0目录中的 Microsoft.Cpp.Win32.user.props 文件(有三个,应该打开哪个看文件名便知),里面内容一般如下

<?xml version="1.0" encoding="utf-8"?><Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup>   <ExecutablePath>$(ExecutablePath)</ExecutablePath>   <IncludePath>$(IncludePath)</IncludePath>   <ReferencePath>$(ReferencePath)</ReferencePath>   <LibraryPath>$(LibraryPath)</LibraryPath>   <SourcePath>$(SourcePath)</SourcePath>   <ExcludePath>$(ExcludePath)</ExcludePath> </PropertyGroup></Project>


分别在<PropertyGroup> 的<IncludePath>增添加包含目录,在<LibraryPath>项中添加库目录,保存重启VS即可。
原创粉丝点击