MSBuild で Platform='BNB' とエラーが出る件の解決策がようやくわかった
コマンドラインから、MSBuild を起動すると という奇妙なエラーが出て悩まされて困ったけど解決策を発見したのでメモ。狭い範囲の誰得なエントリ。
エラーメッセージ
下記のようなエラーが出る。ポイントは、 Platform='BNB' のメッセージ。
c:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(483,9): error : The OutputPath property is not set for project 'sample. csproj'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Debug' Pl atform='BNB'. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configur ation or Platform that doesn't exist for this project.
解決方法
set PLATFORM=
とかやって空にしてから、MSBuild実行。MSBuild実行するバッチファイルの中で設定しておくといいかも。
http://www.nichesoftware.co.nz/blog/2011-05/496/invalid-build-configuration-debugbnb
たぶん この罠は、 HP ProBook だけなのかもしれないなぁ。。
環境
- HP ProBook 4520s
- Windows 7 Professional 32-bit
- MSBuild (.NET Framework 4)
- 作者: 山近慶一
- 出版社/メーカー: 技術評論社
- 発売日: 2011/12/09
- メディア: 単行本(ソフトカバー)
- 購入: 16人 クリック: 246回
- この商品を含むブログ (18件) を見る