summarylogtreecommitdiffstats
path: root/fixed-build-version.patch
blob: 1923db26f0fd7f2355be06d4f9d6d0d86c025be1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Index: xamarin-pkg-msbuild/src/Build.OM.UnitTests/Definition/ProjectCollection_Tests.cs
===================================================================
--- xamarin-pkg-msbuild.orig/src/Build.OM.UnitTests/Definition/ProjectCollection_Tests.cs
+++ xamarin-pkg-msbuild/src/Build.OM.UnitTests/Definition/ProjectCollection_Tests.cs
@@ -1422,10 +1422,14 @@ namespace Microsoft.Build.UnitTests.OM.D
         [Fact]
         public void ProjectCollectionVersionIsCorrect()
         {
+            ProjectCollection.Version.ShouldNotBe(new Version(0, 0, 0, 0));
+
+#if THISASSEMBLY
             Version expectedVersion = new Version(ThisAssembly.AssemblyFileVersion);
 
             ProjectCollection.Version.Major.ShouldBe(expectedVersion.Major);
             ProjectCollection.Version.Minor.ShouldBe(expectedVersion.Minor);
+#endif
         }
 
         /// <summary>
Index: xamarin-pkg-msbuild/src/Directory.Build.targets
===================================================================
--- xamarin-pkg-msbuild.orig/src/Directory.Build.targets
+++ xamarin-pkg-msbuild/src/Directory.Build.targets
@@ -107,6 +107,16 @@
 
   <Import Project="$([System.IO.Path]::Combine('$(RepoRoot)', 'eng', 'GetBuildVersionStub.proj'))" Condition="'$(DisableNerdbankVersioning)' == 'true'" />
 
+  <Target Name="OverrideRepoToolsetVersions"
+          AfterTargets="_InitializeAssemblyVersion"
+          Condition="'$(DisableNerdbankVersioning)' == 'true'">
+    <PropertyGroup>
+      <AssemblyVersion>15.1.0.0</AssemblyVersion>
+      <FileVersion>16.0.0.0</FileVersion>
+      <InformationalVersion>$(FileVersion)-mono</InformationalVersion>
+    </PropertyGroup>
+  </Target>
+
   <Target Name="GetNuGetPackageVersionEx"
     BeforeTargets="GenerateNuspec"
     DependsOnTargets="GetBuildVersion"