私はこの方法でアセンブリを織り込むことができました:
の内容をコピーしpackages\Fody.xx\
ましたAssemblies\Fody\
次に.csproj
、コピーしたファイルを指すように を変更しました.targets
( の末尾に向かって.csproj
) :
<Import Project="$(SolutionDir)\Assemblies\Fody\build\dotnet\Fody.targets" Condition="Exists('$(SolutionDir)\Assemblies\Fody\build\dotnet\Fody.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)\Assemblies\Fody\build\dotnet\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\Assemblies\Fody\build\dotnet\Fody.targets'))" />
</Target>
TFS のメンテナーが Nuget パッケージを別のフォルダーにダウンロードしていると思われます (たとえば、すべてのプロジェクトのすべての Nuget パッケージのコピーを 1 つだけ持つため)。これは、この種のパッケージが通常の方法で機能しないことを意味します。