Microsoft.Build 名を使用する mono でプロジェクトをビルドしたいと考えています。
using System;
using System.Diagnostics;
using System.IO;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
ファイル全体はこちらから入手できます。
ただし、次のエラーが発生します。
$ mcs LoggerImpl.cs
LoggerImpl.cs(4,17): error CS0234: The type or namespace name `Build' does not exist in the namespace `Microsoft'. Are you missing an assembly reference?
LoggerImpl.cs(5,17): error CS0234: The type or namespace name `Build' does not exist in the namespace `Microsoft'. Are you missing an assembly reference?
LoggerImpl.cs(15,41): error CS0246: The type or namespace name `IEventSource' could not be found. Are you missing a using directive or an assembly reference?
LoggerImpl.cs(28,44): error CS0246: The type or namespace name `ProjectStartedEventArgs' could not be found. Are you missing a using directive or an assembly reference?
LoggerImpl.cs(36,43): error CS0246: The type or namespace name `BuildFinishedEventArgs' could not be found. Are you missing a using directive or an assembly reference?
LoggerImpl.cs(52,41): error CS0246: The type or namespace name `BuildErrorEventArgs' could not be found. Are you missing a using directive or an assembly reference?
LoggerImpl.cs(62,43): error CS0246: The type or namespace name `BuildWarningEventArgs' could not be found. Are you missing a using directive or an assembly reference?
Compilation failed: 7 error(s), 0 warnings
smcも同様です。gacutil は Microsoft.Build をインストール済みアセンブリとして一覧表示するため、これは奇妙です。
$gacutil -l Microsoft.Build
The following assemblies are installed into the GAC:
Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Number of items = 1
また、Microsoft.Build.Framework (これも使用されます) もインストールされます。
$ gacutil -l Microsoft.Build.Framework
The following assemblies are installed into the GAC:
Microsoft.Build.Framework, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Microsoft.Build.Framework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Number of items = 3
私は何を間違っていますか?