Skip to content

Commit bf9bfe1

Browse files
authored
🔧Set assembly file version to match nuget version (#1582)
Fixes #1557 Forward port of #1581 (cherry picked from commit 6fe8e42) The assembly file version was incorrectly set to the same as `<AssemblyVersion>`, which is fixed to the major version for strong naming. ### Changes - Explicitly configure `<FileVersion>` to match the nuget package version
1 parent 281713e commit bf9bfe1

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

UnitsNet.Benchmark/UnitsNet.Benchmark.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFrameworks>net9.0;net48</TargetFrameworks>
5-
<LangVersion>preview</LangVersion>
6-
<Version>4.0.0.0</Version>
7-
<AssemblyVersion>4.0.0.0</AssemblyVersion>
4+
<TargetFrameworks>net9.0;net48</TargetFrameworks>
5+
<LangVersion>preview</LangVersion>
6+
<Version>6.0.0.0</Version>
7+
<AssemblyVersion>6.0.0.0</AssemblyVersion>
88
<AssemblyTitle>UnitsNet.Benchmark</AssemblyTitle>
99
<Product>UnitsNet.Benchmark</Product>
1010
<RootNamespace>UnitsNet.Benchmark</RootNamespace>

UnitsNet.NumberExtensions/UnitsNet.NumberExtensions.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
</PropertyGroup>
1919

2020
<PropertyGroup>
21-
<AssemblyVersion>6.0.0.0</AssemblyVersion>
21+
<AssemblyVersion>6.0.0.0</AssemblyVersion> <!-- Fixed to major version, for strong naming -->
22+
<FileVersion>$(Version)</FileVersion> <!-- Will match NuGet version -->
2223
<LangVersion>latest</LangVersion>
2324
<Nullable>enable</Nullable>
2425
<RootNamespace>UnitsNet</RootNamespace>

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020

2121
<!-- Assembly and msbuild properties -->
2222
<PropertyGroup>
23-
<AssemblyVersion>6.0.0.0</AssemblyVersion> <!-- Should reflect major part of Version -->
23+
<AssemblyVersion>6.0.0.0</AssemblyVersion> <!-- Fixed to major version, for strong naming -->
24+
<FileVersion>$(Version)</FileVersion> <!-- Will match NuGet version -->
2425
<LangVersion>latest</LangVersion>
2526
<Nullable>enable</Nullable>
2627
<RootNamespace>UnitsNet.Serialization.JsonNet</RootNamespace>

UnitsNet/UnitsNet.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020

2121
<!-- Assembly and msbuild properties -->
2222
<PropertyGroup>
23-
<AssemblyVersion>6.0.0.0</AssemblyVersion> <!-- Should reflect major part of Version -->
23+
<AssemblyVersion>6.0.0.0</AssemblyVersion> <!-- Fixed to major version, for strong naming -->
24+
<FileVersion>$(Version)</FileVersion> <!-- Will match NuGet version -->
2425
<LangVersion>latest</LangVersion>
2526
<Nullable>enable</Nullable>
2627
<RootNamespace>UnitsNet</RootNamespace>

0 commit comments

Comments
 (0)