我正在使用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