修改 VS2010 項目屬性的默認包含路徑

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即可。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章