|
40 | 40 |
|
41 | 41 | <ItemGroup> |
42 | 42 | <!-- Use the same NETCore shared framework as repo built against except when building product code in servicing. --> |
43 | | - <KnownFrameworkReference |
44 | | - Update="@(KnownFrameworkReference->WithMetadataValue('Identity', 'Microsoft.NETCore.App')->WithMetadataValue('TargetFramework', '${DefaultNetCoreTargetFramework}'))" |
45 | | - LatestRuntimeFrameworkVersion="${MicrosoftNETCoreAppRuntimeVersion}"> |
| 43 | + <KnownFrameworkReference Update="Microsoft.NETCore.App"> |
| 44 | + <LatestRuntimeFrameworkVersion |
| 45 | + Condition=" '%(TargetFramework)' == '${DefaultNetCoreTargetFramework}' ">${MicrosoftNETCoreAppRuntimeVersion}</LatestRuntimeFrameworkVersion> |
| 46 | + <TargetingPackVersion |
| 47 | + Condition=" '%(TargetFramework)' == '${DefaultNetCoreTargetFramework}' ">${MicrosoftNETCoreAppRefVersion}</TargetingPackVersion> |
46 | 48 | <!-- |
47 | | - Change the default shared framework and targeting pack version only when _not_ servicing. Avoid bumping |
48 | | - version used in most projects. When servicing, projects can use $(TargetLatestRuntimePatch) to explicitly |
49 | | - control whether assemblies build against default (false) or latest (true). When that property is not set, SDK |
50 | | - uses default metadata in most cases but published apps e.g. tool projects (again, property not set) use latest. |
51 | | - |
52 | | - !temporary! Also check $(TargetLatestRuntimePatch) here because these metadata changes otherwise increase the |
53 | | - minimum versions, making $(TargetLatestRuntimePatch) irrelevant. This helps to avoid problems with current |
54 | | - `[assembly: AssemblyVersion(...)]` changes in dotnet/runtime assemblies and our MSBuild tasks. |
| 49 | + Change the default shared framework version only when _not_ servicing. Avoid bumping version used in most |
| 50 | + projects. When servicing, projects (Microsoft.AspNetCore.App.Runtime in particular) can use |
| 51 | + $(TargetLatestRuntimePatch) to explicitly control whether assemblies build against default (false) or |
| 52 | + latest (true). When that property is not set, SDK uses default metadata in most cases but published apps |
| 53 | + e.g. tool projects (again, property not set) use latest. |
| 54 | + On the other hand, $(TargetLatestDotNetRuntime) is specific to this repo and controls only the update below. |
55 | 55 | --> |
56 | 56 | <DefaultRuntimeFrameworkVersion Condition=" '$(IsServicingBuild)' != 'true' AND |
| 57 | + '%(TargetFramework)' == '${DefaultNetCoreTargetFramework}' AND |
57 | 58 | '$(TargetLatestDotNetRuntime)' != 'false' ">${MicrosoftNETCoreAppRuntimeVersion}</DefaultRuntimeFrameworkVersion> |
58 | | - <TargetingPackVersion Condition=" '$(IsServicingBuild)' != 'true' AND |
59 | | - '$(TargetLatestDotNetRuntime)' != 'false' ">${MicrosoftNETCoreAppRefVersion}</TargetingPackVersion> |
60 | 59 | </KnownFrameworkReference> |
61 | 60 |
|
62 | 61 | <!-- Use the just-built ASP.NET Core shared framework if available except when building product code in servicing. --> |
63 | | - <KnownFrameworkReference |
64 | | - Update="@(KnownFrameworkReference->WithMetadataValue('Identity', 'Microsoft.AspNetCore.App')->WithMetadataValue('TargetFramework', '${DefaultNetCoreTargetFramework}'))" |
65 | | - Condition=" $(UpdateAspNetCoreKnownFramework) " |
66 | | - LatestRuntimeFrameworkVersion="${MicrosoftAspNetCoreAppRuntimeVersion}" |
67 | | - RuntimePackRuntimeIdentifiers="${SupportedRuntimeIdentifiers}"> |
68 | | - <DefaultRuntimeFrameworkVersion |
69 | | - Condition=" '$(IsServicingBuild)' != 'true' ">${MicrosoftAspNetCoreAppRuntimeVersion}</DefaultRuntimeFrameworkVersion> |
| 62 | + <KnownFrameworkReference Update="Microsoft.AspNetCore.App" Condition=" $(UpdateAspNetCoreKnownFramework) "> |
| 63 | + <LatestRuntimeFrameworkVersion |
| 64 | + Condition=" '%(TargetFramework)' == '${DefaultNetCoreTargetFramework}' ">${MicrosoftAspNetCoreAppRuntimeVersion}</LatestRuntimeFrameworkVersion> |
| 65 | + <RuntimePackRuntimeIdentifiers |
| 66 | + Condition=" '%(TargetFramework)' == '${DefaultNetCoreTargetFramework}' ">${SupportedRuntimeIdentifiers}</RuntimePackRuntimeIdentifiers> |
70 | 67 | <TargetingPackVersion |
71 | | - Condition=" '$(IsServicingBuild)' != 'true' ">${MicrosoftAspNetCoreAppRefVersion}</TargetingPackVersion> |
| 68 | + Condition=" '%(TargetFramework)' == '${DefaultNetCoreTargetFramework}' ">${MicrosoftAspNetCoreAppRefVersion}</TargetingPackVersion> |
| 69 | + <DefaultRuntimeFrameworkVersion Condition=" '$(IsServicingBuild)' != 'true' AND |
| 70 | + '%(TargetFramework)' == '${DefaultNetCoreTargetFramework}' ">${MicrosoftAspNetCoreAppRuntimeVersion}</DefaultRuntimeFrameworkVersion> |
72 | 71 | </KnownFrameworkReference> |
73 | | - |
74 | 72 | </ItemGroup> |
75 | 73 |
|
76 | 74 | <!-- Warn if the "just-built" ASP.NET Core shared framework does not exist. --> |
|
0 commit comments