VS 2010中添加C++目录的功能已经被否决,可以通过添加User Property Sheet的方法来添加。
例如,添加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>
属性文件存放的位置是:
%USERPROFILE%\Local Settings\Application Data\Microsoft\MSBuild\v4.0
那么,这个属性文件会应用到Win32平台下所有的CPP项目中去。