dotnet/aspnetcore: Fix AppHost pack prebuilt usage in source-build (#12441)
This commit is contained in:
parent
6834fb954d
commit
c26605442b
1 changed files with 41 additions and 0 deletions
|
@ -0,0 +1,41 @@
|
||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Davis Goodin <dagood@microsoft.com>
|
||||||
|
Date: Mon, 18 Oct 2021 18:45:16 -0500
|
||||||
|
Subject: [PATCH] Fix AppHost pack prebuilt usage in source-build
|
||||||
|
|
||||||
|
This avoids downloading a prebuilt apphost pack.
|
||||||
|
|
||||||
|
Upstream PR: https://github.com/dotnet/aspnetcore/pull/37672
|
||||||
|
---
|
||||||
|
Directory.Build.props | 18 +++++++++++++++---
|
||||||
|
1 file changed, 15 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/Directory.Build.props b/Directory.Build.props
|
||||||
|
index dc1f355411..e2dea35567 100644
|
||||||
|
--- a/Directory.Build.props
|
||||||
|
+++ b/Directory.Build.props
|
||||||
|
@@ -197,9 +197,21 @@
|
||||||
|
|
||||||
|
<!-- The location of the local installation of the .NET Core shared framework. -->
|
||||||
|
<PropertyGroup>
|
||||||
|
- <LocalDotNetRoot>$(RepoRoot).dotnet\</LocalDotNetRoot>
|
||||||
|
- <!-- Override the SDK default and point to local .dotnet folder. -->
|
||||||
|
- <NetCoreTargetingPackRoot>$(LocalDotNetRoot)packs\</NetCoreTargetingPackRoot>
|
||||||
|
+ <!--
|
||||||
|
+ Override the SDK default and point to local .dotnet folder. This is required to work around
|
||||||
|
+ several limitations in the way the .NET SDK finds shared frameworks and targeting packs. It
|
||||||
|
+ allows tests to use shared frameworks and targeting packs.
|
||||||
|
+
|
||||||
|
+ However, source-build needs this to not happen while building projects that rely on the
|
||||||
|
+ AppHost framework pack. Source-build installs an SDK in a custom location outside this
|
||||||
|
+ repository, and setting NetCoreTargetingPackRoot to a different location causes source-build
|
||||||
|
+ to restore the AppHost pack as a prebuilt rather than using the one that's present in the SDK.
|
||||||
|
+
|
||||||
|
+ This condition still allows the Microsoft.AspNetCore.App.Ref and .Runtime projects to publish
|
||||||
|
+ to this location, so they don't modify the existing SDK being used by source-build.
|
||||||
|
+ -->
|
||||||
|
+ <LocalDotNetRoot Condition="'$(DotNetBuildFromSource)' != 'true' or '$(UseAppHost)' != 'true'">$(RepoRoot).dotnet\</LocalDotNetRoot>
|
||||||
|
+ <NetCoreTargetingPackRoot Condition="'$(LocalDotNetRoot)' != ''">$(LocalDotNetRoot)packs\</NetCoreTargetingPackRoot>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<Import Project="eng\tools\RepoTasks\RepoTasks.tasks" Condition="'$(MSBuildProjectName)' != 'RepoTasks' AND '$(DesignTimeBuild)' != 'true'" />
|
Loading…
Reference in a new issue