Back to NuGet, ther's an obscure workaround for now

This commit is contained in:
cygon 2024-07-25 12:42:12 +02:00
parent 079fe8b1cd
commit 67abd0146a
2 changed files with 24 additions and 10 deletions

21
Directory.Build.props Normal file
View File

@ -0,0 +1,21 @@
<Project>
<!--
This file is required to work around one of the many issues with NuGet.
https://github.com/NuGet/Home/issues/4463
If you place two project files side by side, NuGet dumps its 'project.assets.json' file
into the root 'obj' directory (instead of the intermediate directory below it),
causing one project to overwrite the other project's dependencies.
There won't be any buld warning, just suddenly one of the projects won't be able to
access its dependencies and fail to build.
Why such a lackluster system was integrated at that level rather than just left to
(mis)manage the references by updating the project file as needed, I don't know.
files and
-->
<PropertyGroup>
<MSBuildProjectExtensionsPath>obj\$(MSBuildProjectName)</MSBuildProjectExtensionsPath>
</PropertyGroup>
</Project>

View File

@ -22,19 +22,12 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="Nuclex.Support (netstandard-2.0).csproj" /> <PackageReference Include="Moq" Version="4.20.70" />
<PackageReference Include="NUnit" Version="3.14.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Castle.Core"> <ProjectReference Include="Nuclex.Support (netstandard-2.0).csproj" />
<HintPath>..\third-party\castle.core-5.1.1\netstandard-2.0\Castle.Core.dll</HintPath>
</Reference>
<Reference Include="Moq">
<HintPath>..\third-party\moq-4.20.70\netstandard-2.0\Moq.dll</HintPath>
</Reference>
<Reference Include="nunit.framework">
<HintPath>..\third-party\nunit-3.14.0\netstandard-2.0\nunit.framework.dll</HintPath>
</Reference>
</ItemGroup> </ItemGroup>
</Project> </Project>