修改VS属性页中的Inherited values

来源:互联网 发布:路由器网络参数设置 编辑:程序博客网 时间:2024/05/01 18:33

首先在C:\Users\用户名\AppData\Local\Microsoft\MSBuild\v4.0中找到Microsoft.Cpp.Win32.user文件,用文本格式打开,

改成下面的形式

<?xml version="1.0" encoding="utf-8"?><Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">  <ImportGroup Label="PropertySheets">  </ImportGroup>  <PropertyGroup Label="UserMacros" />  <PropertyGroup>    <IncludePath>;$(IncludePath)</IncludePath>  </PropertyGroup>  <ItemDefinitionGroup />  <ItemGroup /></Project>

其中

<PropertyGroup>    <IncludePath>;$(IncludePath)</IncludePath>  </PropertyGroup>
表示的意思就是<IncludePath>宏需要改变的继承值,例如想在<IncludePath>中添加C:\Test的路径,就将这段改为

<PropertyGroup>    <IncludePath>C:\Test;$(IncludePath)</IncludePath>  </PropertyGroup>

其他同理。