|
115 | 115 | </KnownFrameworkReference>
|
116 | 116 | </ItemGroup>
|
117 | 117 |
|
118 |
| - <!-- Warn if the "just-built" ASP.NET Core shared framework does not exist. --> |
119 |
| - <Target Name="WarnAboutMissingSharedFramework" |
120 |
| - BeforeTargets="Restore;Build;Rebuild;RunTests;Test;VSTest;Pack" |
121 |
| - Condition=" $(UpdateAspNetCoreKnownFramework) "> |
122 |
| - <PropertyGroup> |
123 |
| - <!-- |
124 |
| - Property (already normalized) from Arcade SDK's RepoLayout.props. This covers all projects using the |
125 |
| - Arcade SDK. Ignore $(LocalDotNetRoot) because that is set in root Directory.Build.props (where Arcade SDK |
126 |
| - is imported) and therefore doesn't cover additional projects. |
127 |
| - --> |
128 |
| - <_DotNetRoot Condition=" '$(DotNetRoot)' != '' ">$(DotNetRoot)</_DotNetRoot> |
129 |
| - <!-- |
130 |
| - Environment variable from eng/common/tools.ps1 scripts. This covers tests and assets that do not use the |
131 |
| - Arcade SDK but are run from our build.* scripts. |
132 |
| - --> |
133 |
| - <_DotNetRoot Condition=" '$(_DotNetRoot)' == '' AND |
134 |
| - '$(DOTNET_INSTALL_DIR)' != '' ">$([MSBuild]::NormalizeDirectory('$(DOTNET_INSTALL_DIR)'))</_DotNetRoot> |
135 |
| - <!-- |
136 |
| - Environment variable from root activate.* and Helix runtest.* scripts. This covers tests and assets on |
137 |
| - Helix agents and when run locally using 'msbuild' after activation. |
138 |
| - --> |
139 |
| - <_DotNetRoot Condition=" '$(_DotNetRoot)' == '' AND |
140 |
| - '$(DOTNET_ROOT)' != '' ">$([MSBuild]::NormalizeDirectory('$(DOTNET_ROOT)'))</_DotNetRoot> |
141 |
| - </PropertyGroup> |
| 118 | + <!-- When building and running locally, manually resolve the just-built frameworks. On Helix, let the SDK resolve the packs itself (they're laid out on top of the .NET SDK in the work items) --> |
| 119 | + <PropertyGroup Condition="$(UpdateAspNetCoreKnownFramework) and '$(HELIX_CORRELATION_PAYLOAD)' == ''"> |
| 120 | + <EnableTargetingPackDownload>false</EnableTargetingPackDownload> |
| 121 | + <EnableRuntimePackDownload>false</EnableRuntimePackDownload> |
| 122 | + <GenerateErrorForMissingTargetingPacks>false</GenerateErrorForMissingTargetingPacks> |
| 123 | + </PropertyGroup> |
142 | 124 |
|
143 |
| - <Error Text="Unable to determine dotnet root location." Condition=" '$(_DotNetRoot)' == '' " /> |
144 |
| - <Error Text="Dotnet root location '$(_DotNetRoot)' does not exist." Condition=" !EXISTS('$(_DotNetRoot)') " /> |
145 |
| - <Warning Text="Requested Microsoft.AspNetCore.App v${MicrosoftAspNetCoreAppRuntimeVersion} does not exist." |
146 |
| - Condition=" !EXISTS('$(_DotNetRoot)shared\Microsoft.AspNetCore.App\${MicrosoftAspNetCoreAppRuntimeVersion}') " /> |
| 125 | + <Target Name="ResolveLiveBuiltAspnetCoreKnownFramework" Condition="$(UpdateAspNetCoreKnownFramework) and '$(HELIX_CORRELATION_PAYLOAD)' == ''" AfterTargets="ResolveFrameworkReferences"> |
| 126 | + <Error Text="Requested Microsoft.AspNetCore.App v${MicrosoftAspNetCoreAppRefVersion} ref pack does not exist." |
| 127 | + Condition="!Exists('$(TargetingPackLayoutRoot)packs\Microsoft.AspNetCore.App.Ref\${MicrosoftAspNetCoreAppRefVersion}\data\FrameworkList.xml') " /> |
| 128 | + <ItemGroup> |
| 129 | + <ResolvedTargetingPack Path="$(TargetingPackLayoutRoot)packs\Microsoft.AspNetCore.App.Ref\${MicrosoftAspNetCoreAppRefVersion}" |
| 130 | + NugetPackageVersion="${MicrosoftAspNetCoreAppRefVersion}" |
| 131 | + PackageDirectory="$(TargetingPackLayoutRoot)packs\Microsoft.AspNetCore.App.Ref\${MicrosoftAspNetCoreAppRefVersion}" |
| 132 | + Condition="'%(ResolvedTargetingPack.RuntimeFrameworkName)' == 'Microsoft.AspNetCore.App'" /> |
| 133 | + <ResolvedRuntimePack PackageDirectory="$(SharedFrameworkLayoutRoot)shared\Microsoft.AspNetCore.App\${MicrosoftAspNetCoreAppRuntimeVersion}" |
| 134 | + Condition="'%(ResolvedRuntimePack.RuntimeFrameworkName)' == 'Microsoft.AspNetCore.App'" /> |
| 135 | + <ResolvedFrameworkReference TargetingPackPath="$(TargetingPackLayoutRoot)packs\Microsoft.AspNetCore.App.Ref\${MicrosoftAspNetCoreAppRefVersion}" |
| 136 | + TargetingPackVersion="${MicrosoftAspNetCoreAppRefVersion}" |
| 137 | + RuntimePackPath="$(SharedFrameworkLayoutRoot)shared\Microsoft.AspNetCore.App\${MicrosoftAspNetCoreAppRuntimeVersion}" |
| 138 | + Condition="'%(Identity)' == 'Microsoft.AspNetCore.App'" /> |
| 139 | + </ItemGroup> |
147 | 140 | </Target>
|
148 | 141 |
|
149 | 142 | <!--
|
|
0 commit comments