Skip to content

Commit 9abbcba

Browse files
committed
json: Use project references instead of nuget references
In order to catch problems due to breaking changes in UnitsNet that was not observed due having a nuget dependency pointing to an older version of UnitsNet. This way we always build against the latets (local checked out) UnitsNet code. Caveat: The nuget dependency version can no longer be controlled and will always point to the latest version (the one in the checked out code). This means pushing a new Json nuget will also increase its dependency version if a newer one is available. I don't currently know of a way to both get project reference AND control the nuget dependency version, but I consider this a fair tradeoff as it is fair that taking on a newer version of Json lib will require a newer version of UnitsNet too.
1 parent 61ec479 commit 9abbcba

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

UnitsNet.Serialization.JsonNet/UnitsNet.Serialization.JsonNet.Signed.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
<AssemblyOriginatorKeyFile>$(MSBuildProjectDirectory)\..\UnitsNet.snk</AssemblyOriginatorKeyFile>
1414
</PropertyGroup>
1515

16+
<!-- Signed project references, will also generate the corresponding nuget dependencies -->
1617
<ItemGroup>
17-
<PackageReference Include="UnitsNet.Signed" Version="3.65.0-alpha3" />
18+
<ProjectReference Include="..\UnitsNet\UnitsNet.NetStandard10.Signed.csproj" />
1819
</ItemGroup>
1920
</Project>
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<Import Project="UnitsNet.Serialization.JsonNet.Common.props" />
33

4+
<!-- Unsigned project references, will also generate the corresponding nuget dependencies -->
45
<ItemGroup>
5-
<PackageReference Include="UnitsNet" Version="3.65.0-alpha3" />
6+
<ProjectReference Include="..\UnitsNet\UnitsNet.NetStandard10.csproj" />
67
</ItemGroup>
78
</Project>

0 commit comments

Comments
 (0)