|
45 | 45 | <HintPath>$(WiXSdkPath)\Microsoft.Deployment.WindowsInstaller.Package.dll</HintPath> |
46 | 46 | </Reference> |
47 | 47 | </ItemGroup> |
| 48 | + |
| 49 | + <ItemGroup> |
| 50 | + <!-- |
| 51 | + Reference base shared framework at incoming dependency flow version, not bundled sdk version. |
| 52 | + Apply this to all projects that target the default tfm (e.g. net8.0) or a rid-based variant of it (e.g. net8.0-windows) |
| 53 | + --> |
| 54 | + <FrameworkReference |
| 55 | + Update="Microsoft.NETCore.App" |
| 56 | + Condition=" (('$(ProjectTargetFrameworkIdentifier)' == '$(DefaultNetCoreTargetFramework)') AND '$(DefaultNetCoreTargetFramework)' == '$(ProjectTargetFrameworkVersion)') AND '$(TargetLatestDotNetRuntime)' != 'false' " |
| 57 | + RuntimeFrameworkVersion="$(MicrosoftNETCoreAppRuntimeVersion)" |
| 58 | + TargetingPackVersion="$(MicrosoftNETCoreAppRefVersion)" /> |
| 59 | + |
| 60 | + <PackageReference Include="Microsoft.DotNet.ILCompiler" |
| 61 | + Condition=" '$(PublishAot)' == 'true' " |
| 62 | + Version="$(MicrosoftNETCoreAppRuntimeVersion)" /> |
| 63 | + </ItemGroup> |
| 64 | + |
| 65 | + <ItemGroup> |
| 66 | + <!-- Use the same NETCore shared framework as repo built against except when building product code in servicing. --> |
| 67 | + <KnownFrameworkReference Update="Microsoft.NETCore.App"> |
| 68 | + <LatestRuntimeFrameworkVersion |
| 69 | + Condition=" '%(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' ">$(MicrosoftNETCoreAppRuntimeVersion)</LatestRuntimeFrameworkVersion> |
| 70 | + <TargetingPackVersion |
| 71 | + Condition=" '%(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' ">$(MicrosoftNETCoreAppRefVersion)</TargetingPackVersion> |
| 72 | + <!-- |
| 73 | + Change the default shared framework version only when _not_ servicing. Avoid bumping version used in most |
| 74 | + projects. When servicing, projects (Microsoft.AspNetCore.App.Runtime in particular) can use |
| 75 | + $(TargetLatestRuntimePatch) to explicitly control whether assemblies build against default (false) or |
| 76 | + latest (true). When that property is not set, SDK uses default metadata in most cases but published apps |
| 77 | + e.g. tool projects (again, property not set) use latest. |
| 78 | + On the other hand, $(TargetLatestDotNetRuntime) is specific to this repo and controls only the update below. |
| 79 | + --> |
| 80 | + <DefaultRuntimeFrameworkVersion Condition=" '$(IsServicingBuild)' != 'true' AND |
| 81 | + '%(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' AND |
| 82 | + '$(TargetLatestDotNetRuntime)' != 'false' ">$(MicrosoftNETCoreAppRuntimeVersion)</DefaultRuntimeFrameworkVersion> |
| 83 | + <RuntimePackRuntimeIdentifiers Condition=" '$(DotNetBuildSourceOnly)' == 'true' ">$(TargetRuntimeIdentifier)</RuntimePackRuntimeIdentifiers> |
| 84 | + </KnownFrameworkReference> |
| 85 | + |
| 86 | + <KnownAppHostPack Update="Microsoft.NETCore.App"> |
| 87 | + <AppHostPackVersion Condition=" '%(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' ">$(MicrosoftNETCoreAppRuntimeVersion)</AppHostPackVersion> |
| 88 | + <AppHostRuntimeIdentifiers Condition=" '$(DotNetBuildSourceOnly)' == 'true' ">$(TargetRuntimeIdentifier)</AppHostRuntimeIdentifiers> |
| 89 | + </KnownAppHostPack> |
| 90 | + |
| 91 | + <KnownRuntimePack Update="Microsoft.NETCore.App"> |
| 92 | + <LatestRuntimeFrameworkVersion |
| 93 | + Condition=" '%(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' ">$(MicrosoftNETCoreAppRuntimeVersion)</LatestRuntimeFrameworkVersion> |
| 94 | + <AppHostRuntimeIdentifiers Condition=" '$(DotNetBuildSourceOnly)' == 'true' ">$(TargetRuntimeIdentifier)</AppHostRuntimeIdentifiers> |
| 95 | + </KnownRuntimePack> |
| 96 | + |
| 97 | + <KnownWebAssemblySdkPack Update="Microsoft.NET.Sdk.WebAssembly.Pack"> |
| 98 | + <WebAssemblySdkPackVersion |
| 99 | + Condition=" '%(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' ">$(MicrosoftNETCoreAppRuntimeVersion)</WebAssemblySdkPackVersion> |
| 100 | + </KnownWebAssemblySdkPack> |
| 101 | + |
| 102 | + <KnownCrossgen2Pack Update="Microsoft.NETCore.App.Crossgen2" Condition=" '$(DotNetBuildSourceOnly)' == 'true' "> |
| 103 | + <Crossgen2PackVersion |
| 104 | + Condition=" '%(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' ">$(MicrosoftNETCoreAppRuntimeVersion)</Crossgen2PackVersion> |
| 105 | + <Crossgen2RuntimeIdentifiers>$(TargetRuntimeIdentifier)</Crossgen2RuntimeIdentifiers> |
| 106 | + </KnownCrossgen2Pack> |
| 107 | + |
| 108 | + <!-- Use the just-built ASP.NET Core shared framework if available except when building product code in servicing. --> |
| 109 | + <KnownFrameworkReference Update="Microsoft.AspNetCore.App" Condition=" $(UpdateAspNetCoreKnownFramework) "> |
| 110 | + <LatestRuntimeFrameworkVersion |
| 111 | + Condition=" '%(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' ">$(MicrosoftAspNetCoreAppRuntimeVersion)</LatestRuntimeFrameworkVersion> |
| 112 | + <RuntimePackRuntimeIdentifiers |
| 113 | + Condition=" '%(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' ">$(SupportedRuntimeIdentifiers)</RuntimePackRuntimeIdentifiers> |
| 114 | + <!-- Do not update %(TargetingPackVersion) until X.Y.0 versions have been released. --> |
| 115 | + <TargetingPackVersion |
| 116 | + Condition=" '%(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' AND '$(AspNetCorePatchVersion)' != '1' ">$(MicrosoftAspNetCoreAppRefVersion)</TargetingPackVersion> |
| 117 | + <DefaultRuntimeFrameworkVersion Condition=" '$(IsServicingBuild)' != 'true' AND |
| 118 | + '%(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' ">$(MicrosoftAspNetCoreAppRuntimeVersion)</DefaultRuntimeFrameworkVersion> |
| 119 | + </KnownFrameworkReference> |
| 120 | + </ItemGroup> |
48 | 121 | </Project> |
0 commit comments