Skip to content
代码片段 群组 项目
未验证 提交 8fd0398b 编辑于 作者: Doug Bunting's avatar Doug Bunting 提交者: GitHub
浏览文件

[release/6.0] Always use latest targeting packs (#37120)

- backport of #36718

Always use latest targeting packs (#36718)

  - also, only update latest `@(KnownFrameworkReference)` items
    - previously the updates applied e.g. to all Microsoft.NETCore.App items

  nit: expand `@(KnownFrameworkReference)` comments
上级 9d1273ac
No related branches found
No related tags found
无相关合并请求
...@@ -23,37 +23,35 @@ ...@@ -23,37 +23,35 @@
<ItemGroup> <ItemGroup>
<!-- Use the same NETCore shared framework as repo built against except when building product code in servicing. --> <!-- Use the same NETCore shared framework as repo built against except when building product code in servicing. -->
<KnownFrameworkReference <KnownFrameworkReference Update="Microsoft.NETCore.App">
Update="@(KnownFrameworkReference->WithMetadataValue('Identity', 'Microsoft.NETCore.App')->WithMetadataValue('TargetFramework', '${DefaultNetCoreTargetFramework}'))" <LatestRuntimeFrameworkVersion
LatestRuntimeFrameworkVersion="${MicrosoftNETCoreAppRuntimeVersion}"> Condition=" '%(TargetFramework)' == '${DefaultNetCoreTargetFramework}' ">${MicrosoftNETCoreAppRuntimeVersion}</LatestRuntimeFrameworkVersion>
<TargetingPackVersion
Condition=" '%(TargetFramework)' == '${DefaultNetCoreTargetFramework}' ">${MicrosoftNETCoreAppRefVersion}</TargetingPackVersion>
<!-- <!--
Change the default shared framework and targeting pack version only when _not_ servicing. Avoid bumping Change the default shared framework version only when _not_ servicing. Avoid bumping version used in most
version used in most projects. When servicing, projects can use $(TargetLatestRuntimePatch) to explicitly projects. When servicing, projects (Microsoft.AspNetCore.App.Runtime in particular) can use
control whether assemblies build against default (false) or latest (true). When that property is not set, SDK $(TargetLatestRuntimePatch) to explicitly control whether assemblies build against default (false) or
uses default metadata in most cases but published apps e.g. tool projects (again, property not set) use latest. latest (true). When that property is not set, SDK uses default metadata in most cases but published apps
e.g. tool projects (again, property not set) use latest.
!temporary! Also check $(TargetLatestRuntimePatch) here because these metadata changes otherwise increase the On the other hand, $(TargetLatestDotNetRuntime) is specific to this repo and controls only the update below.
minimum versions, making $(TargetLatestRuntimePatch) irrelevant. This helps to avoid problems with current
`[assembly: AssemblyVersion(...)]` changes in dotnet/runtime assemblies and our MSBuild tasks.
--> -->
<DefaultRuntimeFrameworkVersion Condition=" '$(IsServicingBuild)' != 'true' AND <DefaultRuntimeFrameworkVersion Condition=" '$(IsServicingBuild)' != 'true' AND
'%(TargetFramework)' == '${DefaultNetCoreTargetFramework}' AND
'$(TargetLatestDotNetRuntime)' != 'false' ">${MicrosoftNETCoreAppRuntimeVersion}</DefaultRuntimeFrameworkVersion> '$(TargetLatestDotNetRuntime)' != 'false' ">${MicrosoftNETCoreAppRuntimeVersion}</DefaultRuntimeFrameworkVersion>
<TargetingPackVersion Condition=" '$(IsServicingBuild)' != 'true' AND
'$(TargetLatestDotNetRuntime)' != 'false' ">${MicrosoftNETCoreAppRefVersion}</TargetingPackVersion>
</KnownFrameworkReference> </KnownFrameworkReference>
<!-- Use the just-built ASP.NET Core shared framework if available except when building product code in servicing. --> <!-- Use the just-built ASP.NET Core shared framework if available except when building product code in servicing. -->
<KnownFrameworkReference <KnownFrameworkReference Update="Microsoft.AspNetCore.App" Condition=" $(UpdateAspNetCoreKnownFramework) ">
Update="@(KnownFrameworkReference->WithMetadataValue('Identity', 'Microsoft.AspNetCore.App')->WithMetadataValue('TargetFramework', '${DefaultNetCoreTargetFramework}'))" <LatestRuntimeFrameworkVersion
Condition=" $(UpdateAspNetCoreKnownFramework) " Condition=" '%(TargetFramework)' == '${DefaultNetCoreTargetFramework}' ">${MicrosoftAspNetCoreAppRuntimeVersion}</LatestRuntimeFrameworkVersion>
LatestRuntimeFrameworkVersion="${MicrosoftAspNetCoreAppRuntimeVersion}" <RuntimePackRuntimeIdentifiers
RuntimePackRuntimeIdentifiers="${SupportedRuntimeIdentifiers}"> Condition=" '%(TargetFramework)' == '${DefaultNetCoreTargetFramework}' ">${SupportedRuntimeIdentifiers}</RuntimePackRuntimeIdentifiers>
<DefaultRuntimeFrameworkVersion
Condition=" '$(IsServicingBuild)' != 'true' ">${MicrosoftAspNetCoreAppRuntimeVersion}</DefaultRuntimeFrameworkVersion>
<TargetingPackVersion <TargetingPackVersion
Condition=" '$(IsServicingBuild)' != 'true' ">${MicrosoftAspNetCoreAppRefVersion}</TargetingPackVersion> Condition=" '%(TargetFramework)' == '${DefaultNetCoreTargetFramework}' ">${MicrosoftAspNetCoreAppRefVersion}</TargetingPackVersion>
<DefaultRuntimeFrameworkVersion Condition=" '$(IsServicingBuild)' != 'true' AND
'%(TargetFramework)' == '${DefaultNetCoreTargetFramework}' ">${MicrosoftAspNetCoreAppRuntimeVersion}</DefaultRuntimeFrameworkVersion>
</KnownFrameworkReference> </KnownFrameworkReference>
</ItemGroup> </ItemGroup>
<!-- Warn if the "just-built" ASP.NET Core shared framework does not exist. --> <!-- Warn if the "just-built" ASP.NET Core shared framework does not exist. -->
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册