|
23 | 23 |
|
24 | 24 | <ItemGroup> |
25 | 25 | <!-- Use the same NETCore shared framework as repo built against except when building product code in servicing. --> |
26 | | - <KnownFrameworkReference |
27 | | - Update="@(KnownFrameworkReference->WithMetadataValue('Identity', 'Microsoft.NETCore.App')->WithMetadataValue('TargetFramework', '${DefaultNetCoreTargetFramework}'))" |
28 | | - LatestRuntimeFrameworkVersion="${MicrosoftNETCoreAppRuntimeVersion}"> |
| 26 | + <KnownFrameworkReference Update="Microsoft.NETCore.App"> |
| 27 | + <LatestRuntimeFrameworkVersion |
| 28 | + Condition=" '%(TargetFramework)' == '${DefaultNetCoreTargetFramework}' ">${MicrosoftNETCoreAppRuntimeVersion}</LatestRuntimeFrameworkVersion> |
| 29 | + <TargetingPackVersion |
| 30 | + Condition=" '%(TargetFramework)' == '${DefaultNetCoreTargetFramework}' ">${MicrosoftNETCoreAppRefVersion}</TargetingPackVersion> |
29 | 31 | <!-- |
30 | | - Change the default shared framework and targeting pack version only when _not_ servicing. Avoid bumping |
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. |
| 32 | + Change the default shared framework version only when _not_ servicing. Avoid bumping version used in most |
| 33 | + projects. When servicing, projects (Microsoft.AspNetCore.App.Runtime in particular) can use |
| 34 | + $(TargetLatestRuntimePatch) to explicitly control whether assemblies build against default (false) or |
| 35 | + latest (true). When that property is not set, SDK uses default metadata in most cases but published apps |
| 36 | + e.g. tool projects (again, property not set) use latest. |
| 37 | + On the other hand, $(TargetLatestDotNetRuntime) is specific to this repo and controls only the update below. |
38 | 38 | --> |
39 | 39 | <DefaultRuntimeFrameworkVersion Condition=" '$(IsServicingBuild)' != 'true' AND |
| 40 | + '%(TargetFramework)' == '${DefaultNetCoreTargetFramework}' AND |
40 | 41 | '$(TargetLatestDotNetRuntime)' != 'false' ">${MicrosoftNETCoreAppRuntimeVersion}</DefaultRuntimeFrameworkVersion> |
41 | | - <TargetingPackVersion Condition=" '$(IsServicingBuild)' != 'true' AND |
42 | | - '$(TargetLatestDotNetRuntime)' != 'false' ">${MicrosoftNETCoreAppRefVersion}</TargetingPackVersion> |
43 | 42 | </KnownFrameworkReference> |
44 | 43 |
|
45 | 44 | <!-- Use the just-built ASP.NET Core shared framework if available except when building product code in servicing. --> |
46 | | - <KnownFrameworkReference |
47 | | - Update="@(KnownFrameworkReference->WithMetadataValue('Identity', 'Microsoft.AspNetCore.App')->WithMetadataValue('TargetFramework', '${DefaultNetCoreTargetFramework}'))" |
48 | | - Condition=" $(UpdateAspNetCoreKnownFramework) " |
49 | | - LatestRuntimeFrameworkVersion="${MicrosoftAspNetCoreAppRuntimeVersion}" |
50 | | - RuntimePackRuntimeIdentifiers="${SupportedRuntimeIdentifiers}"> |
51 | | - <DefaultRuntimeFrameworkVersion |
52 | | - Condition=" '$(IsServicingBuild)' != 'true' ">${MicrosoftAspNetCoreAppRuntimeVersion}</DefaultRuntimeFrameworkVersion> |
| 45 | + <KnownFrameworkReference Update="Microsoft.AspNetCore.App" Condition=" $(UpdateAspNetCoreKnownFramework) "> |
| 46 | + <LatestRuntimeFrameworkVersion |
| 47 | + Condition=" '%(TargetFramework)' == '${DefaultNetCoreTargetFramework}' ">${MicrosoftAspNetCoreAppRuntimeVersion}</LatestRuntimeFrameworkVersion> |
| 48 | + <RuntimePackRuntimeIdentifiers |
| 49 | + Condition=" '%(TargetFramework)' == '${DefaultNetCoreTargetFramework}' ">${SupportedRuntimeIdentifiers}</RuntimePackRuntimeIdentifiers> |
53 | 50 | <TargetingPackVersion |
54 | | - Condition=" '$(IsServicingBuild)' != 'true' ">${MicrosoftAspNetCoreAppRefVersion}</TargetingPackVersion> |
| 51 | + Condition=" '%(TargetFramework)' == '${DefaultNetCoreTargetFramework}' ">${MicrosoftAspNetCoreAppRefVersion}</TargetingPackVersion> |
| 52 | + <DefaultRuntimeFrameworkVersion Condition=" '$(IsServicingBuild)' != 'true' AND |
| 53 | + '%(TargetFramework)' == '${DefaultNetCoreTargetFramework}' ">${MicrosoftAspNetCoreAppRuntimeVersion}</DefaultRuntimeFrameworkVersion> |
55 | 54 | </KnownFrameworkReference> |
56 | | - |
57 | 55 | </ItemGroup> |
58 | 56 |
|
59 | 57 | <!-- Warn if the "just-built" ASP.NET Core shared framework does not exist. --> |
|
0 commit comments