Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/aspnetcore.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavis Goodin <dagood@users.noreply.github.com>2021-10-21 23:35:36 +0300
committerGitHub <noreply@github.com>2021-10-21 23:35:36 +0300
commit2984e3bcd52999698abcba353b1a92f4fd2b2d65 (patch)
treefab596fe20df49de8650ea70aeb4b2f9c2449363 /Directory.Build.props
parent88c720f125a92df225dccc4a6308a865e179e37d (diff)
Fix AppHost pack prebuilt usage in source-build (#37672)
Diffstat (limited to 'Directory.Build.props')
-rw-r--r--Directory.Build.props14
1 files changed, 12 insertions, 2 deletions
diff --git a/Directory.Build.props b/Directory.Build.props
index 1972c4bf6f..8ac249c1d6 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -194,8 +194,18 @@
<!-- 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 done to work around
+ limitations in the way the .NET SDK finds shared frameworks and targeting packs. It allows
+ tests to use the shared frameworks and targeting packs that were just built.
+
+ 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.
+ Source-build doesn't run tests, so the property is simply conditioned out.
+ -->
+ <NetCoreTargetingPackRoot Condition="'$(DotNetBuildFromSource)' != 'true'">$(LocalDotNetRoot)packs\</NetCoreTargetingPackRoot>
</PropertyGroup>
<Import Project="eng\tools\RepoTasks\RepoTasks.tasks" Condition="'$(MSBuildProjectName)' != 'RepoTasks' AND '$(DesignTimeBuild)' != 'true'" />