我正在使用Visual Studio 2012 RC与我的C#解决方案一起工作。我所有的配置特定设置都存储在一个.props文件中,然后包含在我的所有.csproj文件中。Visual Studio不断向我的csproj添加属性。为什么?
然而VS上把这一权利的面前坚持包括:
<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
简单的答案是,Microsoft从不认为你会做这样的csproj文件定制。有时你可能会有点自定义项目文件(运气好),但大多数时候你只是麻烦自己。 – 2012-07-11 03:04:35