私はMSBuildバージョン14.0を使用しています。参照用のメタデータファイルが見つかりません
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Xml" />
しかし、ビルドに失敗しました:私のItemGroup
秒の一
<Target Name="Build"
Inputs="@(Compile)"
Outputs="MyLibrary.dll">
<Csc
Sources="@(Compile)"
Resources="@(EmbeddedResource)"
References="@(Reference);@(ProjectReference)"
OutputAssembly="MyLibrary.dll"/>
</Target>
、私は次の参照を追加しました:
は、ドキュメントhere後、私はこのような自分のBuild
タスクが定義されこれらのエラーのため:
CSC : error CS0006: Metadata file 'System' could not be found [C:\MyLibrary.csproj]
CSC : error CS0006: Metadata file 'System.Core' could not be found C:\MyLibrary.csproj]
CSC : error CS0006: Metadata file 'System.Runtime.Serialization' could not be found [C:\MyLibrary.csproj]
CSC : error CS0006: Metadata file 'System.Xml' could not be found [C:\MyLibrary.csproj]
どうすればこの問題を解決できますか?
EDIT:私は、上記のエラーメッセージに記載されたすべてのDLLは、代わりに私の.csproj
ファイルを含むフォルダ内の、C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6\
に位置しているので、MSBuildのは、そのエラーを投げたと思います。私はそれらの参照をコピーしてプロジェクトフォルダに貼り付けたくないです。これらのDLLを正しく配置するにはどうすればよいですか?
感謝。私はこれにショットをつけ、更新を書きます。 –