今日NAntを使い始めたばかりで、いくつかの例に従いました。私は1つの問題に苦労しています:
「ビルドを機能させるには、GUID '{32845370-6F32-411F-B4C5-383F9C3EDE29}' のプロジェクトを含める必要があります。」
これで、プロジェクトを追跡することができました。これが私のディレクトリ構造です:
c:\dev\stockclockbuild
-> これは、ソリューションとビルド ファイルがある場所です。だから私はコマンドを実行します:
nant -buildfile:c:\dev\stockclockbuild\stocks.build
c:\dev\_sharedlibs\mdrlibs
含まれているように見える「MDR.StockPlatform」という名前のプロジェクトがありますが、そのプロジェクトファイル内に、エラーに記載されている GUID を持つプロジェクト (依存関係) が見つかりました。
そのプロジェクトは「MDR.Base」と呼ばれますが、MDR.StockPlatform と同じフォルダーにあります。 また、このソリューションを開いてビジュアル スタジオでビルドすると、エラーなくビルドされます。
完全な詳細出力は次のとおりです。
c:\Dev\_Misc\Tools\nAnt\bin>nant -buildfile:c:\dev\stockclockbuild\stocks.build
NAnt 0.92 (Build 0.92.4543.0; release; 6/9/2012)
Copyright (C) 2001-2012 Gerry Shaw
http://nant.sourceforge.net
Buildfile: file:///c:/dev/stockclockbuild/stocks.build
Target framework: Microsoft .NET Framework 4.0
Target(s) specified: rebuild
clean:
build:
build.stockclock:
[solution] Starting solution build.
[solution] Loading projects...
[solution] Loading project 'c:\dev\stockclockbuild\StockClock.Common\StockClock
.Common.csproj'.
[solution] Using MSBuild version 4.0.30319.1.
[solution] Loading referenced project 'c:\dev\_SharedLibs\MDRLibs\MDR.StockPlat
form\MDR.StockPlatform.csproj'.
BUILD FAILED
Project with GUID '{32845370-6F32-411F-B4C5-383F9C3EDE29}' must be included for
the build to work.
Total time: 0.6 seconds.
ビルド ファイルのコピーを次に示します。
<project name="Solution Build Example" default="rebuild">
<property name="configuration" value="release"/>
<target name="clean" description="Delete all previously compiled binaries.">
<delete>
<fileset>
<include name="**/bin/**" />
<include name="**/obj/**" />
<include name="**/*.suo" />
<include name="**/*.user" />
</fileset>
</delete>
</target>
<target name="build" description="Build all targets.">
<call target="build.stockclock"/>
</target>
<target name="rebuild" depends="clean, build" />
<target name="build.stockclock">
<solution configuration="${configuration}" solutionfile="Stockclock.sln" verbose="true">
</solution>
</target>
</project>