【发布时间】:2012-07-09 05:03:47
【问题描述】:
我正在使用 Visual Studio 2012 RC 来处理我的 C# 解决方案。我的所有特定于配置的设置都存储在一个 .props 文件中,然后我的所有 .csproj 文件都包含该文件。
然而 VS 坚持把它放在 include 前面:
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<IntermediateOutputPath>C:\Users\xyz\AppData\Local\Temp\vs855E.tmp\Debug\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<IntermediateOutputPath>C:\Users\xyz\AppData\Local\Temp\vs855E.tmp\Release\</IntermediateOutputPath>
</PropertyGroup>
<Import Project="$(MSBuildProjectDirectory)\..\Common.props" />
为什么会这样?
仅供参考,我的常用文件如下所示:http://pastebin.com/Uued1XY0
【问题讨论】:
-
简单的回答是微软从不认为你会做这样的csproj文件定制。有时您可能能够稍微自定义项目文件(运气好),但大多数时候您只是麻烦自己。
标签: .net visual-studio msbuild visual-studio-2012 csproj