VS 2010中添加C++目錄的功能已經被否決,可以通過添加User Property Sheet的方法來添加。
例如,添加Microsoft.Cpp.Win32.user.props:
屬性文件存放的位置是:
%USERPROFILE%\Local Settings\Application Data\Microsoft\MSBuild\v4.0
那么,這個屬性文件會應用到Win32平臺下所有的CPP項目中去。
例如,添加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>$(VCInstallDir)PlatformSDK\bin;$(VSInstallDir)\SDK\v2.0\bin;$(ExecutablePath)</ExecutablePath>
<IncludePath>$(VCInstallDir)PlatformSDK\include;D:\Work\SQLite\SourceCode\sqlite-amalgamation-3_6_19;Z:\Common;C:\jdk1.6.0_02\include;$(IncludePath)</IncludePath>
<ReferencePath>$(ReferencePath)</ReferencePath>
<LibraryPath>$(VCInstallDir)PlatformSDK\lib;Z:\Lib;$(LibraryPath)</LibraryPath>
<SourcePath>$(SourcePath)</SourcePath>
<ExcludePath>$(VCInstallDir)PlatformSDK\include;$(ExcludePath)</ExcludePath>
</PropertyGroup>
</Project>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ExecutablePath>$(VCInstallDir)PlatformSDK\bin;$(VSInstallDir)\SDK\v2.0\bin;$(ExecutablePath)</ExecutablePath>
<IncludePath>$(VCInstallDir)PlatformSDK\include;D:\Work\SQLite\SourceCode\sqlite-amalgamation-3_6_19;Z:\Common;C:\jdk1.6.0_02\include;$(IncludePath)</IncludePath>
<ReferencePath>$(ReferencePath)</ReferencePath>
<LibraryPath>$(VCInstallDir)PlatformSDK\lib;Z:\Lib;$(LibraryPath)</LibraryPath>
<SourcePath>$(SourcePath)</SourcePath>
<ExcludePath>$(VCInstallDir)PlatformSDK\include;$(ExcludePath)</ExcludePath>
</PropertyGroup>
</Project>
屬性文件存放的位置是:
%USERPROFILE%\Local Settings\Application Data\Microsoft\MSBuild\v4.0
那么,這個屬性文件會應用到Win32平臺下所有的CPP項目中去。