Browse Source

Enable unified build (#54084)

* Unified build support
Matt Mitchell 1 year ago
parent
commit
aefa4caf03
55 changed files with 94 additions and 91 deletions
  1. 5 5
      Directory.Build.BeforeCommonTargets.targets
  2. 8 1
      Directory.Build.props
  3. 1 1
      Directory.Build.targets
  4. 2 2
      eng/Dependencies.props
  5. 11 17
      eng/DotNetBuild.props
  6. 3 1
      eng/Npm.Workspace.nodeproj
  7. 1 1
      eng/Publishing.props
  8. 1 1
      eng/configure-toolset.sh
  9. 1 1
      eng/targets/CSharp.Common.targets
  10. 1 1
      eng/targets/FunctionalTestWithAssets.targets
  11. 1 1
      eng/targets/ResolveReferences.targets
  12. 1 1
      eng/tools/GenerateFiles/GenerateFiles.csproj
  13. 1 1
      eng/tools/HelixTestRunner/HelixTestRunner.csproj
  14. 1 1
      eng/tools/RepoTasks/RepoTasks.csproj
  15. 7 7
      src/BuildAfterTargetingPack/BuildAfterTargetingPack.csproj
  16. 1 1
      src/Caching/SqlServer/src/Microsoft.Extensions.Caching.SqlServer.csproj
  17. 1 1
      src/Caching/StackExchangeRedis/src/Microsoft.Extensions.Caching.StackExchangeRedis.csproj
  18. 1 1
      src/Components/Components/src/Microsoft.AspNetCore.Components.csproj
  19. 1 1
      src/Components/WebAssembly/Directory.Build.props
  20. 1 1
      src/Components/WebAssembly/testassets/WasmLinkerTest/WasmLinkerTest.csproj
  21. 2 2
      src/Components/benchmarkapps/Wasm.Performance/Driver/Wasm.Performance.Driver.csproj
  22. 1 1
      src/Configuration.KeyPerFile/src/Microsoft.Extensions.Configuration.KeyPerFile.csproj
  23. 1 1
      src/DataProtection/DataProtection/src/Microsoft.AspNetCore.DataProtection.csproj
  24. 1 1
      src/DataProtection/Extensions/src/Microsoft.AspNetCore.DataProtection.Extensions.csproj
  25. 1 1
      src/Extensions/Features/src/Microsoft.Extensions.Features.csproj
  26. 2 2
      src/FileProviders/Embedded/src/Microsoft.Extensions.FileProviders.Embedded.csproj
  27. 1 1
      src/FileProviders/Manifest.MSBuildTask/src/Microsoft.Extensions.FileProviders.Embedded.Manifest.Task.csproj
  28. 3 3
      src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj
  29. 1 1
      src/HealthChecks/Abstractions/src/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.csproj
  30. 1 1
      src/HealthChecks/HealthChecks/src/Microsoft.Extensions.Diagnostics.HealthChecks.csproj
  31. 1 1
      src/HttpClientFactory/Polly/src/Microsoft.Extensions.Http.Polly.csproj
  32. 1 1
      src/Identity/Extensions.Core/src/Microsoft.Extensions.Identity.Core.csproj
  33. 1 1
      src/Identity/Extensions.Stores/src/Microsoft.Extensions.Identity.Stores.csproj
  34. 1 1
      src/Localization/Abstractions/src/Microsoft.Extensions.Localization.Abstractions.csproj
  35. 1 1
      src/Localization/Localization/src/Microsoft.Extensions.Localization.csproj
  36. 1 1
      src/Logging.AzureAppServices/Directory.Build.props
  37. 1 1
      src/Middleware/tools/RazorPageGenerator/RazorPageGenerator.csproj
  38. 1 1
      src/Security/Authorization/Core/src/Microsoft.AspNetCore.Authorization.csproj
  39. 1 1
      src/Servers/Connections.Abstractions/src/Microsoft.AspNetCore.Connections.Abstractions.csproj
  40. 3 3
      src/Servers/HttpSys/src/Microsoft.AspNetCore.Server.HttpSys.csproj
  41. 3 3
      src/Servers/IIS/IIS/src/Microsoft.AspNetCore.Server.IIS.csproj
  42. 1 1
      src/Servers/IIS/IIS/test/FunctionalTest.props
  43. 1 1
      src/SignalR/common/Http.Connections.Common/src/Microsoft.AspNetCore.Http.Connections.Common.csproj
  44. 1 1
      src/SignalR/common/Protocols.Json/src/Microsoft.AspNetCore.SignalR.Protocols.Json.csproj
  45. 1 1
      src/SignalR/common/SignalR.Common/src/Microsoft.AspNetCore.SignalR.Common.csproj
  46. 1 1
      src/Testing/Directory.Build.props
  47. 1 1
      src/Tools/Directory.Build.targets
  48. 1 1
      src/Tools/FirstRunCertGenerator/src/Microsoft.AspNetCore.DeveloperCertificates.XPlat.csproj
  49. 1 1
      src/Tools/LinkabilityChecker/LinkabilityChecker.csproj
  50. 2 2
      src/Tools/Microsoft.dotnet-openapi/test/dotnet-microsoft.openapi.Tests.csproj
  51. 1 1
      src/Tools/SDK-Analyzers/Components/src/Microsoft.AspNetCore.Components.SdkAnalyzers.csproj
  52. 1 1
      src/Tools/dotnet-dev-certs/src/dotnet-dev-certs.csproj
  53. 1 1
      src/Tools/dotnet-user-jwts/src/dotnet-user-jwts.csproj
  54. 1 1
      src/Tools/dotnet-user-secrets/src/dotnet-user-secrets.csproj
  55. 1 1
      src/WebEncoders/src/Microsoft.Extensions.WebEncoders.csproj

+ 5 - 5
Directory.Build.BeforeCommonTargets.targets

@@ -2,18 +2,18 @@
   <PropertyGroup>
     <!-- Only build Microsoft.AspNetCore.App, Microsoft.AspNetCore.App.Ref, ref/ assemblies, and ProjectTemplates in source build. -->
     <!-- Analyzer package are needed in source build for WebSDK -->
-    <ExcludeFromSourceBuild
-        Condition="'$(ExcludeFromSourceBuild)' == '' and
-            '$(DotNetBuildFromSource)' == 'true' and
+    <ExcludeFromSourceOnlyBuild
+        Condition="'$(ExcludeFromSourceOnlyBuild)' == '' and
+            '$(DotNetBuildSourceOnly)' == 'true' and
             '$(IsAspNetCoreApp)' != 'true' and
             '$(MSBuildProjectName)' != '$(TargetingPackName)' and
             '$(IsAnalyzersProject)' != 'true' and
-            '$(IsProjectTemplateProject)' != 'true'">true</ExcludeFromSourceBuild>
+            '$(IsProjectTemplateProject)' != 'true'">true</ExcludeFromSourceOnlyBuild>
 
     <!-- If the user has specified that they want to skip building any test related projects with SkipTestBuild,
      suppress all targets for TestProjects using ExcludeFromBuild. -->
     <ExcludeFromBuild Condition="'$(IsPackable)' != 'true' and
-        '$(SkipTestBuild)' == 'true' and
+        ('$(SkipTestBuild)' == 'true' or ('$(DotNetBuild)' == 'true' and '$(DotNetBuildTests)' != 'true')) and
         ($(IsTestProject) or
          '$(IsPublishedAppTestProject)' == 'true' or
          '$(IsTestAssetProject)' == 'true' or

+ 8 - 1
Directory.Build.props

@@ -192,6 +192,8 @@
   <!-- The location of the local installation of the .NET Core shared framework. -->
   <PropertyGroup>
     <LocalDotNetRoot>$(RepoRoot).dotnet\</LocalDotNetRoot>
+    <LocalDotNetRoot Condition="'$(DotNetBuild)' == 'true'">DontDareMutateThisSDK</LocalDotNetRoot>
+
     <!--
       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
@@ -203,7 +205,12 @@
       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>
+    <NetCoreTargetingPackRoot Condition="'$(DotNetBuild)' != 'true'">$(LocalDotNetRoot)packs\</NetCoreTargetingPackRoot>
+    <!-- This is not correct and needs attention eventually. This is primarily used to find the nethost headers in the apphost pack.
+         These should be coming from a restored apphost pack, rather than a hard-coded local SDK. In fact, aspnetcore
+         should not rely on a local SDK or mutating one to build. -->
+    <NetCoreTargetingPackRoot Condition="'$(DotNetBuild)' == 'true'">$(DotNetRoot)packs\</NetCoreTargetingPackRoot>
+
   </PropertyGroup>
 
   <Import Project="eng\tools\RepoTasks\RepoTasks.tasks" Condition="'$(MSBuildProjectName)' != 'RepoTasks' AND '$(DesignTimeBuild)' != 'true'" />

+ 1 - 1
Directory.Build.targets

@@ -157,7 +157,7 @@
   </PropertyGroup>
 
   <!-- Properties for Package Validation -->
-  <PropertyGroup Condition="'$(ExcludeFromSourceBuild)' != 'true'">
+  <PropertyGroup Condition="'$(ExcludeFromSourceOnlyBuild)' != 'true'">
     <EnablePackageValidation Condition="'$(EnablePackageValidation)' == ''">true</EnablePackageValidation>
     <DisablePackageBaselineValidation Condition="'$(IsServicingBuild)' != 'true'">true</DisablePackageBaselineValidation>
     <GenerateCompatibilitySuppressionFile>true</GenerateCompatibilitySuppressionFile>

+ 2 - 2
eng/Dependencies.props

@@ -137,7 +137,7 @@ and are generated based on the last package release.
     <LatestPackageReference Include="@(_LatestRuntimePackageReference->Distinct())" />
   </ItemGroup>
 
-  <ItemGroup Label=".NET team dependencies (Non-source-build)" Condition="'$(DotNetBuildFromSource)' != 'true'">
+  <ItemGroup Label=".NET team dependencies (Non-source-build)" Condition="'$(DotNetBuildSourceOnly)' != 'true'">
     <LatestPackageReference Include="Microsoft.AspNet.WebApi.Client" />
     <LatestPackageReference Include="Microsoft.AspNetCore.AzureAppServices.SiteExtension.2.1" />
     <LatestPackageReference Include="Microsoft.AspNetCore.AzureAppServices.SiteExtension.3.1.x64" />
@@ -191,7 +191,7 @@ and are generated based on the last package release.
     <LatestPackageReference Include="Newtonsoft.Json" />
   </ItemGroup>
 
-  <ItemGroup Label="External dependencies" Condition="'$(DotNetBuildFromSource)' != 'true'">
+  <ItemGroup Label="External dependencies" Condition="'$(DotNetBuildSourceOnly)' != 'true'">
     <LatestPackageReference Include="AngleSharp" />
     <LatestPackageReference Include="Azure.Identity" />
     <LatestPackageReference Include="BenchmarkDotNet" />

+ 11 - 17
eng/SourceBuild.props → eng/DotNetBuild.props

@@ -8,24 +8,16 @@
     <SourceBuildTargetFrameworkFilter>netstandard2.0%3bnetstandard2.1%3bnetcoreapp2.1%3bnetcoreapp3.1%3bnet5.0%3bnet6.0%3bnet7.0%3bnet8.0%3bnet9.0</SourceBuildTargetFrameworkFilter>
   </PropertyGroup>
 
-  <!-- Only run this target in source-build only mode. -->
-  <Target Name="PrepareGlobalJsonForSourceBuild"
-          AfterTargets="PrepareInnerSourceBuildRepoRoot"
-          BeforeTargets="RunInnerSourceBuildCommand"
-          Condition="'$(ArcadeBuildFromSource)' == 'true'">
-    <Exec
-      Command="./eng/scripts/prepare-sourcebuild-globaljson.sh"
-      WorkingDirectory="$(InnerSourceBuildRepoRoot)" />
-  </Target>
-
   <!--
     Remove inner source .globalconfig file as both the inner and outer config files get loaded and cause a conflict.
     Leaving the inner will cause all conflicting settings to be ignored.
-    https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/configuration-files#general-options
+    https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/configuration-files#general-options.
+    This only needs to be done if there is an inner clone.
   -->
   <Target Name="RemoveInnerGlobalConfig"
           DependsOnTargets="PrepareInnerSourceBuildRepoRoot"
-          BeforeTargets="RunInnerSourceBuildCommand">
+          BeforeTargets="RunInnerSourceBuildCommand"
+          Condition="'$(DotNetBuildOrchestrator)' != 'true'">
 
     <Delete Files="$(InnerSourceBuildRepoRoot).globalconfig" />
   </Target>
@@ -33,7 +25,7 @@
   <!-- Build RepoTasks - this is normally triggered via the build script but the inner ArPow source-build is run via msbuild.
        https://github.com/dotnet/source-build/issues/3807 -->
   <Target Name="BuildRepoTasks"
-          Condition="'$(ArcadeInnerBuildFromSource)' == 'true'"
+          Condition="'$(DotNetBuildInnerRepo)' == 'true' and '$(DotNetBuildSourceOnly)' == 'true'"
           BeforeTargets="Execute">
     <!-- If the alternative runtime location and key are present, pass those through -->
     <PropertyGroup>
@@ -46,8 +38,6 @@
     <ItemGroup>
       <!-- We need to flow FullAssemblySigningSupported even when building repo tasks because they use full signing -->
       <InnerBuildEnv Condition="'$(FullAssemblySigningSupported)' != ''" Include="FullAssemblySigningSupported=$(FullAssemblySigningSupported)" />
-      <InnerBuildEnv Include="DotNetBuildFromSource=$(ArcadeBuildFromSource)" />
-      <InnerBuildEnv Include="DotNetBuildVertical=$(ArcadeBuildVertical)" />
       <InnerBuildEnv Include="DotNetBuildSourceOnly=$(DotNetBuildSourceOnly)" />
     </ItemGroup>
 
@@ -90,11 +80,15 @@
       -->
       <IntermediateNupkgArtifactFile Include="$(InstallersArtifactsDir)aspnetcore-runtime-*.tar.gz" />
       <IntermediateNupkgArtifactFile Include="$(InstallersArtifactsDir)aspnetcore_base_runtime.version" />
+      <IntermediateNupkgArtifactFile Include="$(InstallersArtifactsDir)aspnetcore-runtime-*.msi" />
+      <IntermediateNupkgArtifactFile Include="$(InstallersArtifactsDir)aspnetcore-runtime-*.pkg" />
+      <IntermediateNupkgArtifactFile Include="$(InstallersArtifactsDir)aspnetcore-runtime-*.deb" />
+      <IntermediateNupkgArtifactFile Include="$(InstallersArtifactsDir)aspnetcore-runtime-*.rpm" />
     </ItemGroup>
   </Target>
 
   <Target Name="RestoreNpmPackages"
-          Condition="'$(BuildNodeJS)' == 'true'"
+          Condition="'$(BuildNodeJS)' == 'true' and '$(DotNetBuildSourceOnly)' == 'true'"
           BeforeTargets="RunInnerSourceBuildCommand">
 
     <Message Text="Checking node version..." Importance="high" />
@@ -120,7 +114,7 @@
   </Target>
 
   <Target Name="BuildNpmFiles"
-          Condition="'$(BuildNodeJS)' == 'true'"
+          Condition="'$(BuildNodeJS)' == 'true' and '$(DotNetBuildSourceOnly)' == 'true'"
           DependsOnTargets="RestoreNpmPackages"
           BeforeTargets="RunInnerSourceBuildCommand">
 

+ 3 - 1
eng/Npm.Workspace.nodeproj

@@ -5,7 +5,9 @@
 
   <PropertyGroup>
     <IsShippingPackage>true</IsShippingPackage>
-    <ExcludeFromSourceBuild>false</ExcludeFromSourceBuild>
+    <!-- This explicitly includes this project even though it's a test project, unit test project,
+         etc. which would be excluded by default. -->
+    <ExcludeFromDotNetBuild>false</ExcludeFromDotNetBuild>
     <IsTestProject>true</IsTestProject>
     <IsUnitTestProject>true</IsUnitTestProject>
     <TestDependsOnAspNetPackages>false</TestDependsOnAspNetPackages>

+ 1 - 1
eng/Publishing.props

@@ -62,7 +62,7 @@
       <!-- Do not push .nupkg files from Linux and macOS builds. They'll be packed up separately and signed on Windows.
            Do not remove if post build sign is true, as we avoid the xplat codesign jobs, and need to have
            the nupkgs pushed. Do not do this if building from source, since we want the source build intermediate package
-           to be published. Use ArcadeBuildFromSource as DotNetBuildFromSource is only set in the internal source build,
+           to be published. Use DotNetBuildRepo is only set in the internal source build,
            and Build.proj is invoked from the wrapper build. -->
       <ItemsToPushToBlobFeed Remove="@(ItemsToPushToBlobFeed)" Condition="'$(OS)' != 'Windows_NT' and '$(PostBuildSign)' != 'true' and '$(DotNetBuildRepo)' != 'true'" />
 

+ 1 - 1
eng/configure-toolset.sh

@@ -2,7 +2,7 @@
 # We could potentially try to find an existing installation that has all the required runtimes,
 # but it's unlikely one will be available.
 
-if [ "${DotNetBuildFromSource:-false}" = false ]; then
+if [ "${DotNetBuild:-false}" = false ]; then
     use_installed_dotnet_cli="false"
 fi
 

+ 1 - 1
eng/targets/CSharp.Common.targets

@@ -60,7 +60,7 @@
     <Using Include="Xunit" Condition=" $(IsTestProject) " />
   </ItemGroup>
 
-  <ItemGroup Condition=" '$(DotNetBuildFromSource)' != 'true' AND $(AddPublicApiAnalyzers) ">
+  <ItemGroup Condition=" '$(DotNetBuildSourceOnly)' != 'true' AND $(AddPublicApiAnalyzers) ">
     <Reference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" ExcludeAssets="Compile" PrivateAssets="All" />
   </ItemGroup>
   <Target Name="_CheckIgnoredPublicApiFiles"

+ 1 - 1
eng/targets/FunctionalTestWithAssets.targets

@@ -11,7 +11,7 @@
   <Target Name="PublishTestAssets"
       BeforeTargets="Build;Publish;RunTests;VSTest"
       Condition=" '$(ExcludeFromBuild)' != 'true' AND
-        '$(DotNetBuildFromSource)' != 'true' AND
+        ('$(DotNetBuild)' != 'true' or '$(DotNetBuildTests)' == 'true') AND
         '@(TestAssetProjectReference->Count())' != '0' ">
     <ItemGroup>
       <_ProjectsToPublish Include="@(TestAssetProjectReference)" />

+ 1 - 1
eng/targets/ResolveReferences.targets

@@ -20,7 +20,7 @@
 
   <PropertyGroup>
     <EnableCustomReferenceResolution
-      Condition="'$(EnableCustomReferenceResolution)' == '' AND ('$(DotNetBuildFromSource)' != 'true' OR '$(ExcludeFromSourceBuild)' != 'true')">true</EnableCustomReferenceResolution>
+      Condition="'$(EnableCustomReferenceResolution)' == '' AND ('$(DotNetBuildSourceOnly)' != 'true' OR '$(ExcludeFromSourceOnlyBuild)' != 'true')">true</EnableCustomReferenceResolution>
 
     <ResolveReferencesDependsOn>
       ResolveCustomReferences;

+ 1 - 1
eng/tools/GenerateFiles/GenerateFiles.csproj

@@ -2,7 +2,7 @@
   <PropertyGroup>
     <!-- Use fixed version instead of $(DefaultNetCoreTargetFramework) to avoid needing workarounds set up here. -->
     <TargetFramework>net5.0</TargetFramework>
-    <ExcludeFromSourceBuild>false</ExcludeFromSourceBuild>
+    <ExcludeFromSourceOnlyBuild>false</ExcludeFromSourceOnlyBuild>
 
     <ConfigDirectory>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', '.config'))</ConfigDirectory>
   </PropertyGroup>

+ 1 - 1
eng/tools/HelixTestRunner/HelixTestRunner.csproj

@@ -16,7 +16,7 @@
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
 
     <!-- We don't need this unless building for tests. -->
-    <ExcludeFromBuild Condition=" '$(DotNetBuildFromSource)' == 'true' OR '$(SkipTestBuild)' == 'true' ">true</ExcludeFromBuild>
+    <ExcludeFromBuild Condition=" ('$(DotNetBuild)' == 'true' AND '$(DotNetBuildTests)' != 'true') OR '$(SkipTestBuild)' == 'true' ">true</ExcludeFromBuild>
   </PropertyGroup>
 
   <ItemGroup>

+ 1 - 1
eng/tools/RepoTasks/RepoTasks.csproj

@@ -7,7 +7,7 @@
     <DebugType>embedded</DebugType>
     <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
     <!-- Need to build this project in source build -->
-    <ExcludeFromSourceBuild>false</ExcludeFromSourceBuild>
+    <ExcludeFromSourceOnlyBuild>false</ExcludeFromSourceOnlyBuild>
     <!-- Temporarily target the previous runtime until https://github.com/dotnet/sdk/pull/14574 is merged. -->
     <TargetLatestDotNetRuntime>false</TargetLatestDotNetRuntime>
     <!-- No need to track public APIs of these MSBuild tasks. -->

+ 7 - 7
src/BuildAfterTargetingPack/BuildAfterTargetingPack.csproj

@@ -41,7 +41,7 @@
   <!-- Cannot build in source-build because that does not create an App.Ref layout. -->
   <Target Name="BuildDelayedProjects"
       BeforeTargets="Build"
-      Condition=" '$(DotNetBuildFromSource)' != 'true' "
+      Condition=" '$(DotNetBuild)' != 'true' "
       Returns="@(TargetPathWithTargetPlatformMoniker)">
     <MSBuild Projects="@(RequiresDelayedBuild)"
         BuildInParallel="$(BuildInParallel)"
@@ -52,13 +52,13 @@
     </MSBuild>
   </Target>
 
-  <Target Name="CleanDelayedProjects" BeforeTargets="Clean" Condition=" '$(DotNetBuildFromSource)' != 'true' ">
+  <Target Name="CleanDelayedProjects" BeforeTargets="Clean" Condition=" '$(DotNetBuild)' != 'true' ">
     <MSBuild Projects="@(RequiresDelayedBuild)" BuildInParallel="$(BuildInParallel)" Targets="Clean" />
   </Target>
 
   <Target Name="CreateHelixPayloadDelayedProjects"
       BeforeTargets="CreateHelixPayload"
-      Condition=" '$(DotNetBuildFromSource)' != 'true' "
+      Condition=" '$(DotNetBuild)' != 'true' "
       Returns="@(HelixWorkItem)">
     <MSBuild Projects="@(RequiresDelayedBuild)"
         BuildInParallel="$(BuildInParallel)"
@@ -76,19 +76,19 @@
     </MSBuild>
   </Target>
 
-  <Target Name="PackDelayedProjects" BeforeTargets="Pack" Condition=" '$(DotNetBuildFromSource)' != 'true' ">
+  <Target Name="PackDelayedProjects" BeforeTargets="Pack" Condition=" '$(DotNetBuild)' != 'true' ">
     <MSBuild Projects="@(RequiresDelayedBuild)" BuildInParallel="$(BuildInParallel)" Targets="Pack" />
   </Target>
 
-  <Target Name="PublishDelayedProjects" BeforeTargets="Publish" Condition=" '$(DotNetBuildFromSource)' != 'true' ">
+  <Target Name="PublishDelayedProjects" BeforeTargets="Publish" Condition=" '$(DotNetBuild)' != 'true' ">
     <MSBuild Projects="@(RequiresDelayedBuild)" BuildInParallel="$(BuildInParallel)" Targets="Publish" />
   </Target>
 
-  <Target Name="TestDelayedProjects" BeforeTargets="Test" Condition=" '$(DotNetBuildFromSource)' != 'true' ">
+  <Target Name="TestDelayedProjects" BeforeTargets="Test" Condition=" '$(DotNetBuild)' != 'true' ">
     <MSBuild Projects="@(RequiresDelayedBuild)" BuildInParallel="$(BuildInParallel)" Targets="Test" />
   </Target>
 
-  <Target Name="VSTestDelayedProjects" BeforeTargets="VSTest" Condition=" '$(DotNetBuildFromSource)' != 'true' ">
+  <Target Name="VSTestDelayedProjects" BeforeTargets="VSTest" Condition=" '$(DotNetBuild)' != 'true' ">
     <MSBuild Projects="@(RequiresDelayedBuild)" BuildInParallel="$(BuildInParallel)" Targets="VSTest" />
   </Target>
 

+ 1 - 1
src/Caching/SqlServer/src/Microsoft.Extensions.Caching.SqlServer.csproj

@@ -5,7 +5,7 @@
     <TargetFrameworks>$(DefaultNetCoreTargetFramework);$(DefaultNetFxTargetFramework);netstandard2.0</TargetFrameworks>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>cache;distributedcache;sqlserver</PackageTags>
-    <ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
+    <ExcludeFromSourceOnlyBuild>true</ExcludeFromSourceOnlyBuild>
     <NoWarn>$(NoWarn);PKG0001</NoWarn>
     <IsPackable>true</IsPackable>
     <IsShipping>true</IsShipping>

+ 1 - 1
src/Caching/StackExchangeRedis/src/Microsoft.Extensions.Caching.StackExchangeRedis.csproj

@@ -5,7 +5,7 @@
     <TargetFrameworks>$(DefaultNetCoreTargetFramework);$(DefaultNetFxTargetFramework);netstandard2.0</TargetFrameworks>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>cache;distributedcache;redis</PackageTags>
-    <ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
+    <ExcludeFromSourceOnlyBuild>true</ExcludeFromSourceOnlyBuild>
     <IsPackable>true</IsPackable>
     <IsShipping>true</IsShipping>
   </PropertyGroup>

+ 1 - 1
src/Components/Components/src/Microsoft.AspNetCore.Components.csproj

@@ -68,7 +68,7 @@
   </PropertyGroup>
 
   <ItemGroup>
-    <NuspecProperty Condition="'$(DotNetBuildFromSource)' != 'true'" Include="systemComponentModelAnnotationsVersion=$(SystemComponentModelAnnotationsVersion)" />
+    <NuspecProperty Condition="'$(DotnetBuildSourceOnly)' != 'true'" Include="systemComponentModelAnnotationsVersion=$(SystemComponentModelAnnotationsVersion)" />
     <NuspecProperty Include="AssemblyName=$(AssemblyName)" />
     <NuspecProperty Include="DefaultNetCoreTargetFramework=$(DefaultNetCoreTargetFramework)" />
     <NuspecProperty Include="OutputPath=$(OutputPath)" />

+ 1 - 1
src/Components/WebAssembly/Directory.Build.props

@@ -2,6 +2,6 @@
   <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.props))\Directory.Build.props" />
   <PropertyGroup>
     <!-- Avoid source build issues with WebAssembly -->
-    <ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
+    <ExcludeFromSourceOnlyBuild>true</ExcludeFromSourceOnlyBuild>
   </PropertyGroup>
 </Project>

+ 1 - 1
src/Components/WebAssembly/testassets/WasmLinkerTest/WasmLinkerTest.csproj

@@ -21,7 +21,7 @@
     <Reference Include="Microsoft.JSInterop" />
     <Reference Include="Microsoft.JSInterop.WebAssembly" />
   </ItemGroup>
-  <Target Name="ILLinkTrimWasmProjects" DependsOnTargets="ResolveReferences" AfterTargets="Build" Condition="'$(DotNetBuildFromSource)' != 'true' AND '$(SkipTestBuild)' != 'true'">
+  <Target Name="ILLinkTrimWasmProjects" DependsOnTargets="ResolveReferences" AfterTargets="Build" Condition=" ('$(DotNetBuild)' != true OR '$(DotNetBuildTests)' == 'true') AND '$(SkipTestBuild)' != 'true' ">
     <PropertyGroup>
       <LibrariesTrimmedArtifactsPath>$(TargetDir)wasm-linked\</LibrariesTrimmedArtifactsPath>
       <!-- Link all assemblies -->

+ 2 - 2
src/Components/benchmarkapps/Wasm.Performance/Driver/Wasm.Performance.Driver.csproj

@@ -8,8 +8,8 @@
     <!-- WebDriver is not strong-named, so this test project cannot be strong named either. -->
     <SignAssembly>false</SignAssembly>
     <IsTestAssetProject>true</IsTestAssetProject>
-    <RuntimeIdentifier Condition=" '$(DotNetBuildFromSource)' != 'true' ">linux-x64</RuntimeIdentifier>
-    <SelfContained Condition=" '$(DotNetBuildFromSource)' != 'true' ">true</SelfContained>
+    <RuntimeIdentifier Condition=" '$(DotNetBuildSourceOnly)' != 'true' ">linux-x64</RuntimeIdentifier>
+    <SelfContained Condition=" '$(DotNetBuildSourceOnly)' != 'true' ">true</SelfContained>
     <Nullable>annotations</Nullable>
   </PropertyGroup>
 

+ 1 - 1
src/Configuration.KeyPerFile/src/Microsoft.Extensions.Configuration.KeyPerFile.csproj

@@ -3,7 +3,7 @@
   <PropertyGroup>
     <Description>Configuration provider that uses files in a directory for Microsoft.Extensions.Configuration.</Description>
     <TargetFrameworks>$(DefaultNetFxTargetFramework);netstandard2.0;$(DefaultNetCoreTargetFramework)</TargetFrameworks>
-    <TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
+    <TargetFrameworks Condition="'$(DotNetBuildSourceOnly)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
     <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>configuration</PackageTags>

+ 1 - 1
src/DataProtection/DataProtection/src/Microsoft.AspNetCore.DataProtection.csproj

@@ -3,7 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core logic to protect and unprotect data, similar to DPAPI.</Description>
     <TargetFrameworks>$(DefaultNetFxTargetFramework);netstandard2.0;$(DefaultNetCoreTargetFramework)</TargetFrameworks>
-    <TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
+    <TargetFrameworks Condition="'$(DotNetBuildSourceOnly)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
     <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>

+ 1 - 1
src/DataProtection/Extensions/src/Microsoft.AspNetCore.DataProtection.Extensions.csproj

@@ -3,7 +3,7 @@
   <PropertyGroup>
     <Description>Additional APIs for ASP.NET Core data protection.</Description>
     <TargetFrameworks>$(DefaultNetFxTargetFramework);netstandard2.0;$(DefaultNetCoreTargetFramework)</TargetFrameworks>
-    <TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
+    <TargetFrameworks Condition="'$(DotNetBuildSourceOnly)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
     <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;dataprotection</PackageTags>

+ 1 - 1
src/Extensions/Features/src/Microsoft.Extensions.Features.csproj

@@ -8,7 +8,7 @@ Microsoft.AspNetCore.Http.Features.IFeatureCollection
 Microsoft.AspNetCore.Http.Features.FeatureCollection
     </Description>
     <TargetFrameworks>$(DefaultNetFxTargetFramework);netstandard2.0;$(DefaultNetCoreTargetFramework)</TargetFrameworks>
-    <TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
+    <TargetFrameworks Condition="'$(DotNetBuildSourceOnly)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
     <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore</PackageTags>

+ 2 - 2
src/FileProviders/Embedded/src/Microsoft.Extensions.FileProviders.Embedded.csproj

@@ -5,8 +5,8 @@
     <Description>File provider for files in embedded resources for Microsoft.Extensions.FileProviders.</Description>
     <TargetFrameworks>$(DefaultNetFxTargetFramework);netstandard2.0;$(DefaultNetCoreTargetFramework)</TargetFrameworks>
     <NuspecFile>$(MSBuildProjectName).multitarget.nuspec</NuspecFile>
-    <TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
-    <NuspecFile Condition="'$(DotNetBuildFromSource)' == 'true'">$(MSBuildProjectName).netcoreapp.nuspec</NuspecFile>
+    <TargetFrameworks Condition="'$(DotNetBuildSourceOnly)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
+    <NuspecFile Condition="'$(DotNetBuildSourceOnly)' == 'true'">$(MSBuildProjectName).netcoreapp.nuspec</NuspecFile>
     <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>files;filesystem</PackageTags>

+ 1 - 1
src/FileProviders/Manifest.MSBuildTask/src/Microsoft.Extensions.FileProviders.Embedded.Manifest.Task.csproj

@@ -8,7 +8,7 @@
     <IsShippingAssembly>true</IsShippingAssembly>
     <IsPackable>false</IsPackable>
     <IsImplementationProject>false</IsImplementationProject>
-    <ExcludeFromSourceBuild>false</ExcludeFromSourceBuild>
+    <ExcludeFromSourceOnlyBuild>false</ExcludeFromSourceOnlyBuild>
     <Nullable>enable</Nullable>
   </PropertyGroup>
 

+ 3 - 3
src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj

@@ -8,7 +8,7 @@
     <SelfContained>false</SelfContained>
     <PackageId>$(MSBuildProjectName).$(RuntimeIdentifier)</PackageId>
     <!-- Do not exclude this project from source build -->
-    <ExcludeFromSourceBuild>false</ExcludeFromSourceBuild>
+    <ExcludeFromSourceOnlyBuild>false</ExcludeFromSourceOnlyBuild>
     <PackageDescription>Provides a default set of APIs for building an ASP.NET Core application. Contains assets used for self-contained deployments.
 
 This package is an internal implementation of the .NET Core SDK and is not meant to be used as a normal PackageReference.
@@ -44,7 +44,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant
     <!-- Optimize the framework using the crossgen2 tool. Crossgen2 is not currently supported on s390x or ppc64le or armv6 or loongarch64. -->
     <CrossgenOutput Condition=" '$(TargetArchitecture)' == 's390x' OR '$(TargetArchitecture)' == 'armv6' OR '$(TargetArchitecture)' == 'ppc64le' OR '$(TargetArchitecture)' == 'loongarch64' ">false</CrossgenOutput>
     <!-- VMR doesn't produce valid crossgen for the host/build machine https://github.com/dotnet/source-build/issues/3793 -->
-    <CrossgenOutput Condition=" '$(DotnetBuildVertical)' == 'true' AND '$(Crossbuild)' == 'true' ">false</CrossgenOutput>
+    <CrossgenOutput Condition=" '$(DotNetBuild)' == 'true' AND '$(Crossbuild)' == 'true' ">false</CrossgenOutput>
     <CrossgenOutput Condition=" '$(CrossgenOutput)' == '' AND '$(Configuration)' != 'Debug' ">true</CrossgenOutput>
 
     <!-- Produce crossgen2 profiling symbols (.ni.pdb or .r2rmap files). -->
@@ -557,7 +557,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant
   Targets related to creating .zip/.tar.gz
   #########################################
   -->
-  <Target Name="_DownloadAndExtractDotNetRuntime" Condition="'$(DotNetBuildFromSource)' != 'true'">
+  <Target Name="_DownloadAndExtractDotNetRuntime" Condition="'$(DotNetBuild)' != 'true'">
     <!-- Try various places to find the runtime. It's either released (use official version),
          public but un-released (use dotnetbuilds/public), or internal and unreleased (use dotnetbuilds/internal) -->
     <ItemGroup>

+ 1 - 1
src/HealthChecks/Abstractions/src/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.csproj

@@ -8,7 +8,7 @@ Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck
     </Description>
     <RootNamespace>Microsoft.Extensions.Diagnostics.HealthChecks</RootNamespace>
     <TargetFrameworks>$(DefaultNetFxTargetFramework);netstandard2.0;$(DefaultNetCoreTargetFramework)</TargetFrameworks>
-    <TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
+    <TargetFrameworks Condition="'$(DotNetBuildSourceOnly)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>diagnostics;healthchecks</PackageTags>
     <IsAspNetCoreApp>true</IsAspNetCoreApp>

+ 1 - 1
src/HealthChecks/HealthChecks/src/Microsoft.Extensions.Diagnostics.HealthChecks.csproj

@@ -7,7 +7,7 @@ Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckService
 Microsoft.Extensions.Diagnostics.HealthChecks.IHealthChecksBuilder
     </Description>
     <TargetFrameworks>$(DefaultNetFxTargetFramework);netstandard2.0;$(DefaultNetCoreTargetFramework)</TargetFrameworks>
-    <TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
+    <TargetFrameworks Condition="'$(DotNetBuildSourceOnly)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>diagnostics;healthchecks</PackageTags>
     <IsAspNetCoreApp>true</IsAspNetCoreApp>

+ 1 - 1
src/HttpClientFactory/Polly/src/Microsoft.Extensions.Http.Polly.csproj

@@ -10,7 +10,7 @@
 
     <!-- Don't use Microsoft.Extensions.Http.Polly as a namespace, that introduces ambiguities with 'Polly' -->
     <RootNamespace>Microsoft.Extensions.Http</RootNamespace>
-    <ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
+    <ExcludeFromSourceOnlyBuild>true</ExcludeFromSourceOnlyBuild>
     <IsPackable>true</IsPackable>
     <IsShipping>true</IsShipping>
   </PropertyGroup>

+ 1 - 1
src/Identity/Extensions.Core/src/Microsoft.Extensions.Identity.Core.csproj

@@ -3,7 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core Identity is the membership system for building ASP.NET Core web applications, including membership, login, and user data. ASP.NET Core Identity allows you to add login features to your application and makes it easy to customize data about the logged in user.</Description>
     <TargetFrameworks>$(DefaultNetFxTargetFramework);netstandard2.0;$(DefaultNetCoreTargetFramework)</TargetFrameworks>
-    <TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
+    <TargetFrameworks Condition="'$(DotNetBuildSourceOnly)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
     <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;identity;membership</PackageTags>

+ 1 - 1
src/Identity/Extensions.Stores/src/Microsoft.Extensions.Identity.Stores.csproj

@@ -3,7 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core Identity is the membership system for building ASP.NET Core web applications, including membership, login, and user data. ASP.NET Core Identity allows you to add login features to your application and makes it easy to customize data about the logged in user.</Description>
     <TargetFrameworks>$(DefaultNetFxTargetFramework);netstandard2.0;$(DefaultNetCoreTargetFramework)</TargetFrameworks>
-    <TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
+    <TargetFrameworks Condition="'$(DotNetBuildSourceOnly)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
     <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;identity;membership</PackageTags>

+ 1 - 1
src/Localization/Abstractions/src/Microsoft.Extensions.Localization.Abstractions.csproj

@@ -7,7 +7,7 @@ Commonly used types:
 Microsoft.Extensions.Localization.IStringLocalizer
 Microsoft.Extensions.Localization.IStringLocalizer&lt;T&gt;</Description>
     <TargetFrameworks>$(DefaultNetFxTargetFramework);netstandard2.0;$(DefaultNetCoreTargetFramework)</TargetFrameworks>
-    <TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
+    <TargetFrameworks Condition="'$(DotNetBuildSourceOnly)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>localization</PackageTags>
     <IsAspNetCoreApp>true</IsAspNetCoreApp>

+ 1 - 1
src/Localization/Localization/src/Microsoft.Extensions.Localization.csproj

@@ -4,7 +4,7 @@
     <Product>Microsoft .NET Extensions</Product>
     <Description>Application localization services and default implementation based on ResourceManager to load localized assembly resources.</Description>
     <TargetFrameworks>$(DefaultNetFxTargetFramework);netstandard2.0;$(DefaultNetCoreTargetFramework)</TargetFrameworks>
-    <TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
+    <TargetFrameworks Condition="'$(DotNetBuildSourceOnly)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>localization</PackageTags>
     <IsAspNetCoreApp>true</IsAspNetCoreApp>

+ 1 - 1
src/Logging.AzureAppServices/Directory.Build.props

@@ -3,6 +3,6 @@
 
   <PropertyGroup>
     <!-- These projects depend on a 3rd party source -->
-    <ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
+    <ExcludeFromSourceOnlyBuild>true</ExcludeFromSourceOnlyBuild>
   </PropertyGroup>
 </Project>

+ 1 - 1
src/Middleware/tools/RazorPageGenerator/RazorPageGenerator.csproj

@@ -7,7 +7,7 @@
     <PackageId>RazorPageGenerator</PackageId>
     <OutputType>Exe</OutputType>
     <IsShipping>false</IsShipping>
-    <ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
+    <ExcludeFromSourceOnlyBuild>true</ExcludeFromSourceOnlyBuild>
     <!-- No need to track public APIs of this tool. -->
     <AddPublicApiAnalyzers>false</AddPublicApiAnalyzers>
     <Nullable>disable</Nullable>

+ 1 - 1
src/Security/Authorization/Core/src/Microsoft.AspNetCore.Authorization.csproj

@@ -6,7 +6,7 @@ Commonly used types:
 Microsoft.AspNetCore.Authorization.AllowAnonymousAttribute
 Microsoft.AspNetCore.Authorization.AuthorizeAttribute</Description>
     <TargetFrameworks>$(DefaultNetFxTargetFramework);netstandard2.0;$(DefaultNetCoreTargetFramework)</TargetFrameworks>
-    <TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
+    <TargetFrameworks Condition="'$(DotNetBuildSourceOnly)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
     <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;authorization</PackageTags>

+ 1 - 1
src/Servers/Connections.Abstractions/src/Microsoft.AspNetCore.Connections.Abstractions.csproj

@@ -3,7 +3,7 @@
   <PropertyGroup>
     <Description>Core components of ASP.NET Core networking protocol stack.</Description>
     <TargetFrameworks>$(DefaultNetFxTargetFramework);netstandard2.0;netstandard2.1;$(DefaultNetCoreTargetFramework)</TargetFrameworks>
-    <TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
+    <TargetFrameworks Condition="'$(DotNetBuildSourceOnly)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
     <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore</PackageTags>

+ 3 - 3
src/Servers/HttpSys/src/Microsoft.AspNetCore.Server.HttpSys.csproj

@@ -22,7 +22,7 @@
     <Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
   </ItemGroup>
 
-  <ItemGroup Condition="'$(DotNetBuildFromSource)' != 'true'">
+  <ItemGroup Condition="'$(DotNetBuildSourceOnly)' != 'true'">
     <Compile Include="$(SharedSourceRoot)HttpSys\**\*.cs" />
     <Compile Include="$(SharedSourceRoot)Buffers.MemoryPool\*.cs" LinkBase="MemoryPool" />
     <Compile Include="$(SharedSourceRoot)ServerInfrastructure\StringUtilities.cs" LinkBase="ServerInfrastructure\StringUtilities.cs" />
@@ -32,7 +32,7 @@
     <Compile Include="$(SharedSourceRoot)Debugger\StringValuesDictionaryDebugView.cs" LinkBase="Shared" />
   </ItemGroup>
 
-  <ItemGroup Condition="'$(DotNetBuildFromSource)' == 'true'">
+  <ItemGroup Condition="'$(DotNetBuildSourceOnly)' == 'true'">
     <Compile Remove="**\*.cs" />
   </ItemGroup>
 
@@ -41,7 +41,7 @@
     <Reference Include="Microsoft.AspNetCore.Connections.Abstractions" />
     <Reference Include="Microsoft.AspNetCore.Hosting" />
     <Reference Include="Microsoft.Net.Http.Headers" />
-    <Reference Include="Microsoft.Windows.CsWin32" Condition="'$(DotNetBuildFromSource)' != 'true'">
+    <Reference Include="Microsoft.Windows.CsWin32" Condition="'$(DotNetBuildSourceOnly)' != 'true'">
       <PrivateAssets>all</PrivateAssets>
       <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
     </Reference>

+ 3 - 3
src/Servers/IIS/IIS/src/Microsoft.AspNetCore.Server.IIS.csproj

@@ -17,7 +17,7 @@
     <NoWarn>$(NoWarn);CA1416;CS9195</NoWarn>
   </PropertyGroup>
 
-  <ItemGroup Condition="'$(DotNetBuildFromSource)' != 'true'">
+  <ItemGroup Condition="'$(DotNetBuildSourceOnly)' != 'true'">
     <Compile Include="$(SharedSourceRoot)TypeNameHelper\*.cs" />
     <Compile Include="$(SharedSourceRoot)Buffers.MemoryPool\**\*.cs" LinkBase="Shared\" />
     <Compile Include="$(SharedSourceRoot)HttpSys\**\*.cs" LinkBase="Shared\" />
@@ -32,7 +32,7 @@
     <Compile Remove="SourceBuildStubs.cs" />
   </ItemGroup>
 
-  <ItemGroup Condition="'$(DotNetBuildFromSource)' == 'true'">
+  <ItemGroup Condition="'$(DotNetBuildSourceOnly)' == 'true'">
     <Compile Remove="**\*.cs" />
     <Compile Include="SourceBuildStubs.cs" />
   </ItemGroup>
@@ -58,7 +58,7 @@
     <Reference Include="Microsoft.AspNetCore.Http.Features" />
     <Reference Include="Microsoft.AspNetCore.Server.HttpSys" />
     <Reference Include="Microsoft.Extensions.FileProviders.Physical" />
-    <Reference Include="Microsoft.Windows.CsWin32" Condition="'$(DotNetBuildFromSource)' != 'true'">
+    <Reference Include="Microsoft.Windows.CsWin32" Condition="'$(DotNetBuildSourceOnly)' != 'true'">
       <PrivateAssets>all</PrivateAssets>
       <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
     </Reference>

+ 1 - 1
src/Servers/IIS/IIS/test/FunctionalTest.props

@@ -9,7 +9,7 @@
     those targets too to ensure everything is up-to-date when executing tests.
   -->
   <Target Name="CopyAssets" BeforeTargets="Build;Publish;RunTests;VSTest"
-      Condition=" '$(ExcludeFromBuild)' != 'true' AND '$(DotNetBuildFromSource)' != 'true' ">
+      Condition=" '$(ExcludeFromBuild)' != 'true' AND ('$(DotNetBuild)' != 'true' or '$(DotNetBuildTests)' == 'true') ">
     <MSBuild Projects="@(ProjectReference)"
         Targets="PublishTestsAssets"
         SkipNonexistentTargets="true"

+ 1 - 1
src/SignalR/common/Http.Connections.Common/src/Microsoft.AspNetCore.Http.Connections.Common.csproj

@@ -3,7 +3,7 @@
   <PropertyGroup>
     <Description>Common primitives for ASP.NET Connection Handlers and clients</Description>
     <TargetFrameworks>$(DefaultNetFxTargetFramework);netstandard2.0;$(DefaultNetCoreTargetFramework)</TargetFrameworks>
-    <TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
+    <TargetFrameworks Condition="'$(DotNetBuildSourceOnly)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
     <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <RootNamespace>Microsoft.AspNetCore.Http.Connections</RootNamespace>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>

+ 1 - 1
src/SignalR/common/Protocols.Json/src/Microsoft.AspNetCore.SignalR.Protocols.Json.csproj

@@ -3,7 +3,7 @@
   <PropertyGroup>
     <Description>Implements the SignalR Hub Protocol using System.Text.Json.</Description>
     <TargetFrameworks>$(DefaultNetFxTargetFramework);netstandard2.0;$(DefaultNetCoreTargetFramework)</TargetFrameworks>
-    <TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
+    <TargetFrameworks Condition="'$(DotNetBuildSourceOnly)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
     <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <RootNamespace>Microsoft.AspNetCore.SignalR</RootNamespace>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>

+ 1 - 1
src/SignalR/common/SignalR.Common/src/Microsoft.AspNetCore.SignalR.Common.csproj

@@ -3,7 +3,7 @@
   <PropertyGroup>
     <Description>Common serialization primitives for SignalR Clients Servers</Description>
     <TargetFrameworks>$(DefaultNetFxTargetFramework);netstandard2.0;$(DefaultNetCoreTargetFramework)</TargetFrameworks>
-    <TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
+    <TargetFrameworks Condition="'$(DotNetBuildSourceOnly)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
     <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <RootNamespace>Microsoft.AspNetCore.SignalR</RootNamespace>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>

+ 1 - 1
src/Testing/Directory.Build.props

@@ -3,7 +3,7 @@
 
   <PropertyGroup>
     <!-- These projects depend on a 3rd party source -->
-    <ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
+    <ExcludeFromSourceOnlyBuild>true</ExcludeFromSourceOnlyBuild>
     <IsShipping>false</IsShipping>
   </PropertyGroup>
 </Project>

+ 1 - 1
src/Tools/Directory.Build.targets

@@ -1,7 +1,7 @@
 <Project>
   <PropertyGroup Condition=" '$(PackAsTool)' == 'true' ">
     <!-- Microsoft tool packages are required to target both x64 and x86. -->
-    <PackAsToolShimRuntimeIdentifiers Condition=" '$(IsShippingPackage)' == 'true' AND '$(DotNetBuildFromSource)' != 'true' ">win-x64;win-x86</PackAsToolShimRuntimeIdentifiers>
+    <PackAsToolShimRuntimeIdentifiers Condition=" '$(IsShippingPackage)' == 'true' AND '$(DotNetBuildSourceOnly)' != 'true' ">win-x64;win-x86</PackAsToolShimRuntimeIdentifiers>
     <!-- None of the tool projects are project reference providers. -->
     <IsProjectReferenceProvider>false</IsProjectReferenceProvider>
     <!--

+ 1 - 1
src/Tools/FirstRunCertGenerator/src/Microsoft.AspNetCore.DeveloperCertificates.XPlat.csproj

@@ -9,7 +9,7 @@
     <!-- This package contains API for the .NET CLI to generate the aspnet HTTPs dev cert during CLI first-run initialization. -->
 
     <IsShippingPackage>false</IsShippingPackage>
-    <ExcludeFromSourceBuild>false</ExcludeFromSourceBuild>
+    <ExcludeFromSourceOnlyBuild>false</ExcludeFromSourceOnlyBuild>
   </PropertyGroup>
 
   <ItemGroup>

+ 1 - 1
src/Tools/LinkabilityChecker/LinkabilityChecker.csproj

@@ -19,7 +19,7 @@
     <Reference Include="System.Security.Permissions" />
     <Reference Include="System.Threading.AccessControl" />
   </ItemGroup>
-  <Target Name="ILLinkTrimProjects" DependsOnTargets="ResolveReferences" AfterTargets="Build" Condition="'$(DotNetBuildFromSource)' != 'true' AND '$(SkipTestBuild)' != 'true'">
+  <Target Name="ILLinkTrimProjects" DependsOnTargets="ResolveReferences" AfterTargets="Build" Condition="'$(DotNetBuildSourceOnly)' != 'true' AND '$(SkipTestBuild)' != 'true'">
     <PropertyGroup>
       <LibrariesTrimmedArtifactsPath>$(TargetDir)linked\</LibrariesTrimmedArtifactsPath>
       <!-- Link all assemblies -->

+ 2 - 2
src/Tools/Microsoft.dotnet-openapi/test/dotnet-microsoft.openapi.Tests.csproj

@@ -41,11 +41,11 @@
     <RemoveDir Directories="$(TargetDir)TestProjects" Condition="Exists('$(TargetDir)TestProjects')" />
   </Target>
 
-  <Target Name="PublishDotNetOpenApiOnBuild" BeforeTargets="Build" Condition="'$(DotNetBuildFromSource)' != 'true' and '$(ExcludeFromBuild)' != 'true'">
+  <Target Name="PublishDotNetOpenApiOnBuild" BeforeTargets="Build" Condition="'$(DotNetBuildSourceOnly)' != 'true' and '$(ExcludeFromBuild)' != 'true'">
     <MSBuild Projects="$(OpenAPIToolCSProjPath)" Targets="Publish" Properties="PublishDir=$(OutputPath)\tool\;Configuration=$(Configuration)" />
   </Target>
 
-  <Target Name="PublishDotNetOpenApiOnPublish" BeforeTargets="Publish"  Condition="'$(DotNetBuildFromSource)' != 'true' and '$(ExcludeFromBuild)' != 'true'">
+  <Target Name="PublishDotNetOpenApiOnPublish" BeforeTargets="Publish"  Condition="'$(DotNetBuildSourceOnly)' != 'true' and '$(ExcludeFromBuild)' != 'true'">
     <MSBuild Projects="$(OpenAPIToolCSProjPath)" Targets="Publish" Properties="PublishDir=$(PublishDir)\tool\;Configuration=$(Configuration)" />
   </Target>
 </Project>

+ 1 - 1
src/Tools/SDK-Analyzers/Components/src/Microsoft.AspNetCore.Components.SdkAnalyzers.csproj

@@ -9,7 +9,7 @@
     <RootNamespace>Microsoft.AspNetCore.Components.Analyzers</RootNamespace>
     <!-- This package is for internal use only. It contains a CLI which is bundled in the .NET Core SDK. -->
     <IsShippingPackage>false</IsShippingPackage>
-    <ExcludeFromSourceBuild>false</ExcludeFromSourceBuild>
+    <ExcludeFromSourceOnlyBuild>false</ExcludeFromSourceOnlyBuild>
     <IsProjectReferenceProvider>false</IsProjectReferenceProvider>
   </PropertyGroup>
 

+ 1 - 1
src/Tools/dotnet-dev-certs/src/dotnet-dev-certs.csproj

@@ -9,7 +9,7 @@
     <PackAsTool>true</PackAsTool>
     <!-- This package is for internal use only. It contains a CLI which is bundled in the .NET Core SDK. -->
     <IsShippingPackage>false</IsShippingPackage>
-    <ExcludeFromSourceBuild>false</ExcludeFromSourceBuild>
+    <ExcludeFromSourceOnlyBuild>false</ExcludeFromSourceOnlyBuild>
   </PropertyGroup>
 
   <ItemGroup>

+ 1 - 1
src/Tools/dotnet-user-jwts/src/dotnet-user-jwts.csproj

@@ -9,7 +9,7 @@
     <PackAsTool>true</PackAsTool>
     <!-- This package is for internal use only. It contains a CLI which is bundled in the .NET Core SDK. -->
     <IsShippingPackage>false</IsShippingPackage>
-    <ExcludeFromSourceBuild>false</ExcludeFromSourceBuild>
+    <ExcludeFromSourceOnlyBuild>false</ExcludeFromSourceOnlyBuild>
   </PropertyGroup>
 
   <ItemGroup>

+ 1 - 1
src/Tools/dotnet-user-secrets/src/dotnet-user-secrets.csproj

@@ -10,7 +10,7 @@
     <PackAsTool>true</PackAsTool>
     <!-- This package is for internal use only. It contains a CLI which is bundled in the .NET Core SDK. -->
     <IsShippingPackage>false</IsShippingPackage>
-    <ExcludeFromSourceBuild>false</ExcludeFromSourceBuild>
+    <ExcludeFromSourceOnlyBuild>false</ExcludeFromSourceOnlyBuild>
   </PropertyGroup>
 
   <ItemGroup>

+ 1 - 1
src/WebEncoders/src/Microsoft.Extensions.WebEncoders.csproj

@@ -3,7 +3,7 @@
   <PropertyGroup>
     <Description>Contains registration and configuration APIs to add the core framework encoders to a dependency injection container.</Description>
     <TargetFrameworks>$(DefaultNetFxTargetFramework);netstandard2.0;$(DefaultNetCoreTargetFramework)</TargetFrameworks>
-    <TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
+    <TargetFrameworks Condition="'$(DotNetBuildSourceOnly)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore</PackageTags>
     <IsAspNetCoreApp>true</IsAspNetCoreApp>