Skip to content

Commit 70068f5

Browse files
committed
Add temporary workaround for [AssemblyVersion] changes
1 parent 821244d commit 70068f5

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

Diff for: eng/tools/GenerateFiles/Directory.Build.targets.in

+11-7
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,18 @@
2828
LatestRuntimeFrameworkVersion="${MicrosoftNETCoreAppRuntimeVersion}">
2929
<!--
3030
Change the default shared framework and targeting pack version only when _not_ servicing. Avoid bumping
31-
version used in most projects. Projects can use $(TargetLatestRuntimePatch) to explicitly control whether
32-
assemblies build against default (false) or latest (true). When that property is not set, SDK uses
33-
default metadata in most cases but published apps e.g. tool projects (again, property not set) use latest.
31+
version used in most projects. When servicing, projects can use $(TargetLatestRuntimePatch) to explicitly
32+
control whether assemblies build against default (false) or latest (true). When that property is not set, SDK
33+
uses default metadata in most cases but published apps e.g. tool projects (again, property not set) use latest.
34+
35+
!temporary! Also check $(TargetLatestRuntimePatch) here because these metadata changes otherwise increase the
36+
minimum versions, making $(TargetLatestRuntimePatch) irrelevant. This helps to avoid problems with current
37+
`[assembly: AssemblyVersion(...)]` changes in dotnet/runtime assemblies and our MSBuild tasks.
3438
-->
35-
<DefaultRuntimeFrameworkVersion
36-
Condition=" '$(IsServicingBuild)' != 'true' ">${MicrosoftNETCoreAppRuntimeVersion}</DefaultRuntimeFrameworkVersion>
37-
<TargetingPackVersion
38-
Condition=" '$(IsServicingBuild)' != 'true' ">${MicrosoftNETCoreAppRefVersion}</TargetingPackVersion>
39+
<DefaultRuntimeFrameworkVersion Condition=" '$(IsServicingBuild)' != 'true' AND
40+
'$(TargetLatestDotNetRuntime)' != 'false' ">${MicrosoftNETCoreAppRuntimeVersion}</DefaultRuntimeFrameworkVersion>
41+
<TargetingPackVersion Condition=" '$(IsServicingBuild)' != 'true' AND
42+
'$(TargetLatestDotNetRuntime)' != 'false' ">${MicrosoftNETCoreAppRefVersion}</TargetingPackVersion>
3943
</KnownFrameworkReference>
4044

4145
<!-- Use the just-built ASP.NET Core shared framework if available except when building product code in servicing. -->

0 commit comments

Comments
 (0)