カスタム ビルド プロパティを csproj ファイルに渡すには? 私の csproj は VS2008 から VS2012 にアップグレードされました。
MSBuild3 では、ビルドは正常に実行されます。カスタム プロパティにアクセスできます。ただし、MSBuild4 では、次の警告が表示されます。
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.CSharp.targets(316,9): warning MSB3052: The parameter to the compiler is invalid, '/define:MyCustomProp=WHATEVER' will be ignored. [C:\src\MyProj\MyProj.csproj]
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.CSharp.targets(316,9): warning MSB3052: The parameter to the compiler is invalid, '/define:MyCustomPropTwo=WHATEVERTWO' will be ignored. [C:\src\MyProj\MyProj.csproj]
VS2008 で記述されたスクリプトを使用して、MSBuild 4 でこのビルドを実行しています。