[main] [Release/6.0] Throw error if assembly version for ref pack assemblies doesnot...
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Fri, 24 Sep 2021 22:52:40 +0000 (15:52 -0700)
committerGitHub <noreply@github.com>
Fri, 24 Sep 2021 22:52:40 +0000 (15:52 -0700)
* throw errow if assembly version in the ref pack doesnot match last released version

* Fix the condition

* Update eng/Versions.props

Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
Co-authored-by: Anirudh Agnihotry <anagniho@microsoft.com>
Co-authored-by: Anirudh Agnihotry <anirudhagnihotry098@gmail.com>
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
eng/Versions.props
eng/packaging.targets

index 9823ce5..a7c00e5 100644 (file)
@@ -20,6 +20,7 @@
     <UsingToolMicrosoftNetILLinkTasks>true</UsingToolMicrosoftNetILLinkTasks>
     <UsingToolIbcOptimization>false</UsingToolIbcOptimization>
     <UsingToolXliff>false</UsingToolXliff>
+    <LastReleasedStableAssemblyVersion>$(AssemblyVersion)</LastReleasedStableAssemblyVersion>
   </PropertyGroup>
   <!--
     Servicing build settings for Setup/Installer packages. Instructions:
index 8bd6ccb..7f9707a 100644 (file)
     </ItemGroup>
   </Target>
 
+  <Target Name="ValidateAssemblyVersionsInRefPack" 
+          Condition="$(_AssemblyInTargetingPack) == 'true' and '$(PreReleaseVersionLabel)' == 'servicing'" 
+          AfterTargets="CoreCompile" >
+    <Error Condition="'$(AssemblyVersion)' != '$(LastReleasedStableAssemblyVersion)'" Text="AssemblyVersion should match last released assembly version $(LastReleasedStableAssemblyVersion)" />
+  </Target>
+
 </Project>