diff --git a/eng/pipelines/templates/jobs/vmr-build.yml b/eng/pipelines/templates/jobs/vmr-build.yml
index 32de7ce1dbb0..d0395beaf0b7 100644
--- a/eng/pipelines/templates/jobs/vmr-build.yml
+++ b/eng/pipelines/templates/jobs/vmr-build.yml
@@ -371,7 +371,7 @@ jobs:
set -ex
dockerVolumeArgs="-v $(sourcesPath):/vmr"
- sourceOnlyArgs=''
+ customBuildArgs=''
extraBuildProperties=''
if [[ ! -z '${{ parameters.targetOS }}' ]]; then
@@ -382,11 +382,15 @@ jobs:
extraBuildProperties="$extraBuildProperties /p:TargetArchitecture=${{ parameters.targetArchitecture }}"
fi
+ if [[ '${{ parameters.useDevVersions }}' == 'True' ]]; then
+ customBuildArgs="$customBuildArgs --dev"
+ fi
+
if [[ '${{ parameters.buildSourceOnly }}' == 'True' ]]; then
if [[ '${{ parameters.enablePoison }}' == 'True' ]]; then
- sourceOnlyArgs='--poison'
+ customBuildArgs="$customBuildArgs --poison"
fi
- sourceOnlyArgs="$sourceOnlyArgs --source-only /p:SmokeTestsWarnOnSdkContentDiffs=true /p:SmokeTestsExcludeOmniSharpTests=${{ parameters.excludeOmniSharpTests }}"
+ customBuildArgs="$customBuildArgs --source-only /p:SmokeTestsWarnOnSdkContentDiffs=true /p:SmokeTestsExcludeOmniSharpTests=${{ parameters.excludeOmniSharpTests }}"
fi
if [[ -n "${{ parameters.extraProperties }}" ]]; then
@@ -395,10 +399,10 @@ jobs:
# Only use Docker when a container is specified
if [[ -n "${{ parameters.container }}" ]]; then
- docker run --rm $dockerVolumeArgs -w /vmr ${{ parameters.container }} ./build.sh /bl:artifacts/log/Release/Test.binlog --test $sourceOnlyArgs $extraBuildProperties $(additionalBuildArgs)
+ docker run --rm $dockerVolumeArgs -w /vmr ${{ parameters.container }} ./build.sh /bl:artifacts/log/Release/Test.binlog --test $customBuildArgs $extraBuildProperties $(additionalBuildArgs)
else
cd $(sourcesPath)
- ./build.sh /bl:artifacts/log/Release/Test.binlog --test $sourceOnlyArgs $extraBuildProperties $(additionalBuildArgs)
+ ./build.sh /bl:artifacts/log/Release/Test.binlog --test $customBuildArgs $extraBuildProperties $(additionalBuildArgs)
fi
displayName: Run Tests
@@ -425,6 +429,10 @@ jobs:
CopyWithRelativeFolders "src/" $targetFolder "*.binlog"
CopyWithRelativeFolders "src/" $targetFolder "*.log"
+ if (Test-Path "artifacts/scenario-tests/") {
+ CopyWithRelativeFolders "artifacts/scenario-tests/" $targetFolder "*.binlog"
+ }
+
if (Test-Path "artifacts/TestResults/*") {
CopyWithRelativeFolders "artifacts/TestResults/" $targetFolder "*.binlog"
CopyWithRelativeFolders "artifacts/TestResults/" $targetFolder "*.diff"
@@ -452,13 +460,11 @@ jobs:
cd "$(sourcesPath)"
find artifacts/log/ -type f -name "*.binlog" -exec rsync -R {} -t ${targetFolder} \;
find artifacts/log/ -type f -name "*.log" -exec rsync -R {} -t ${targetFolder} \;
-
- if [ -d "artifacts/TestResults/" ]; then
- find artifacts/TestResults/ -type f -name "*.binlog" -exec rsync -R {} -t ${targetFolder} \;
- find artifacts/TestResults/ -type f -name "*.diff" -exec rsync -R {} -t ${targetFolder} \;
- find artifacts/TestResults/ -type f -name "Updated*.txt" -exec rsync -R {} -t ${targetFolder} \;
- find artifacts/TestResults/ -type f -name "*.trx" -exec rsync -R {} -t ${targetFolder} \;
- fi
+ [ -d "artifacts/scenario-tests/" ] && find artifacts/scenario-tests/ -type f -name "*.binlog" -exec rsync -R {} -t ${targetFolder} \;
+ find artifacts/TestResults/ -type f -name "*.binlog" -exec rsync -R {} -t ${targetFolder} \;
+ find artifacts/TestResults/ -type f -name "*.diff" -exec rsync -R {} -t ${targetFolder} \;
+ find artifacts/TestResults/ -type f -name "Updated*.txt" -exec rsync -R {} -t ${targetFolder} \;
+ find artifacts/TestResults/ -type f -name "*.trx" -exec rsync -R {} -t ${targetFolder} \;
if [[ "${{ parameters.buildSourceOnly }}" == "True" ]]; then
find artifacts/prebuilt-report/ -exec rsync -R {} -t ${targetFolder} \;
@@ -490,13 +496,25 @@ jobs:
condition: succeededOrFailed()
continueOnError: true
inputs:
- testRunner: vSTest
+ testRunner: VSTest
testResultsFiles: 'artifacts/TestResults/Release/*.trx'
searchFolder: $(sourcesPath)
mergeTestResults: true
publishRunAttachments: true
testRunTitle: Tests_$(Agent.JobName)
+ - task: PublishTestResults@2
+ displayName: Publish Scenario Test Results
+ condition: succeededOrFailed()
+ continueOnError: true
+ inputs:
+ testRunner: xUnit
+ testResultsFiles: 'artifacts/TestResults/**/scenario-tests/*.xml'
+ searchFolder: $(sourcesPath)
+ mergeTestResults: true
+ publishRunAttachments: true
+ testRunTitle: ScenarioTests_$(Agent.JobName)
+
- task: CopyFiles@2
inputs:
SourceFolder: $(sourcesPath)/artifacts
diff --git a/src/Installer/redist-installer/redist-installer.csproj b/src/Installer/redist-installer/redist-installer.csproj
index 8913fff18a96..270f119db641 100644
--- a/src/Installer/redist-installer/redist-installer.csproj
+++ b/src/Installer/redist-installer/redist-installer.csproj
@@ -16,11 +16,12 @@
+
+
-
diff --git a/src/SourceBuild/content/Directory.Build.props b/src/SourceBuild/content/Directory.Build.props
index d68801f19110..465fbad19cf3 100644
--- a/src/SourceBuild/content/Directory.Build.props
+++ b/src/SourceBuild/content/Directory.Build.props
@@ -160,6 +160,7 @@
$([MSBuild]::NormalizeDirectory('$(ArtifactsObjDir)', 'Symbols'))
$([MSBuild]::NormalizeDirectory('$(ArtifactsObjDir)', 'AssetManifests'))
$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'assets', '$(Configuration)'))
+ $([MSBuild]::NormalizeDirectory('$(ArtifactsObjDir)', 'extracted-dotnet-sdk'))
$([MSBuild]::NormalizeDirectory('$(PrereqsPackagesDir)', 'prebuilt'))
$([MSBuild]::NormalizeDirectory('$(PrereqsPackagesDir)', 'previouslyRestored'))
diff --git a/src/SourceBuild/content/build.sh b/src/SourceBuild/content/build.sh
index 7ad55522584a..086c56a209c8 100755
--- a/src/SourceBuild/content/build.sh
+++ b/src/SourceBuild/content/build.sh
@@ -88,7 +88,7 @@ exclude_ci_binary_log=false
prepare_machine=false
use_dev_versioning=false
-properties=''
+properties=()
while [[ $# > 0 ]]; do
opt="$(echo "${1/#--/-}" | tr "[:upper:]" "[:lower:]")"
case "$opt" in
@@ -120,13 +120,13 @@ while [[ $# > 0 ]]; do
# Source-only settings
-source-only|-source-build|-so|-sb)
sourceOnly=true
- properties="$properties /p:DotNetBuildSourceOnly=true"
+ properties+=( "/p:DotNetBuildSourceOnly=true" )
;;
-online)
- properties="$properties /p:DotNetBuildWithOnlineFeeds=true"
+ properties+=( "/p:DotNetBuildWithOnlineFeeds=true" )
;;
-poison)
- properties="$properties /p:EnablePoison=true"
+ properties+=( "/p:EnablePoison=true" )
;;
-release-manifest)
releaseManifest="$2"
@@ -162,14 +162,14 @@ while [[ $# > 0 ]]; do
;;
# Advanced settings
- -build-tests)
- properties="$properties /p:DotNetBuildTests=true"
+ -build-repo-tests)
+ properties+=( "/p:DotNetBuildTests=true" )
;;
-ci)
ci=true
;;
-clean-while-building|-cwb)
- properties="$properties /p:CleanWhileBuilding=true"
+ properties+=( "/p:CleanWhileBuilding=true" )
;;
-excludecibinarylog|-nobl)
exclude_ci_binary_log=true
@@ -178,13 +178,13 @@ while [[ $# > 0 ]]; do
prepare_machine=true
;;
-use-mono-runtime)
- properties="$properties /p:SourceBuildUseMonoRuntime=true"
+ properties+=( "/p:SourceBuildUseMonoRuntime=true" )
;;
-dev)
use_dev_versioning=true
;;
*)
- properties="$properties $1"
+ properties+=( "$1" )
;;
esac
@@ -198,7 +198,7 @@ if [[ "$ci" == true ]]; then
fi
if [[ "$use_dev_versioning" == true && "$sourceOnly" != true ]]; then
- properties="$properties /p:UseOfficialBuildVersioning=false"
+ properties+=( "/p:UseOfficialBuildVersioning=false" )
fi
# Never use the global nuget cache folder
@@ -234,14 +234,14 @@ function Build {
$targets \
$bl \
/p:Configuration=$configuration \
- $properties
+ "${properties[@]}"
ExitWithExitCode 0
else
if [ "$ci" == "true" ]; then
- properties="$properties /p:ContinuousIntegrationBuild=true"
+ properties+=( "/p:ContinuousIntegrationBuild=true" )
fi
if [ "$test" != "true" ]; then
@@ -251,7 +251,7 @@ function Build {
fi
"$CLI_ROOT/dotnet" build-server shutdown
- "$CLI_ROOT/dotnet" msbuild "$scriptroot/eng/init-source-only.proj" $initSourceOnlyBinaryLog $properties
+ "$CLI_ROOT/dotnet" msbuild "$scriptroot/eng/init-source-only.proj" $initSourceOnlyBinaryLog "${properties[@]}"
# kill off the MSBuild server so that on future invocations we pick up our custom SDK Resolver
"$CLI_ROOT/dotnet" build-server shutdown
fi
@@ -264,7 +264,7 @@ function Build {
bl="/bl:\"$log_dir/Build.binlog\""
fi
- "$CLI_ROOT/dotnet" msbuild --restore "$project" $bl $targets $properties
+ "$CLI_ROOT/dotnet" msbuild --restore "$project" $bl $targets "${properties[@]}"
fi
}
@@ -331,9 +331,9 @@ if [[ "$sourceOnly" == "true" ]]; then
# Support custom source built package locations
if [ "$CUSTOM_PACKAGES_DIR" != "" ]; then
if [ "$test" == "true" ]; then
- properties="$properties /p:CustomSourceBuiltPackagesPath=$CUSTOM_PACKAGES_DIR"
+ properties+=( "/p:CustomSourceBuiltPackagesPath=$CUSTOM_PACKAGES_DIR" )
else
- properties="$properties /p:CustomPrebuiltSourceBuiltPackagesPath=$CUSTOM_PACKAGES_DIR"
+ properties+=( "/p:CustomPrebuiltSourceBuiltPackagesPath=$CUSTOM_PACKAGES_DIR" )
fi
fi
@@ -365,7 +365,7 @@ if [[ "$sourceOnly" == "true" ]]; then
packageVersionsPath="$CUSTOM_PACKAGES_DIR/PackageVersions.props"
elif [ -d "$packagesArchiveDir" ]; then
sourceBuiltArchive=$(find "$packagesArchiveDir" -maxdepth 1 -name 'Private.SourceBuilt.Artifacts*.tar.gz')
- if [ -f "${packagesPreviouslySourceBuiltDir}}PackageVersions.props" ]; then
+ if [ -f "${packagesPreviouslySourceBuiltDir}PackageVersions.props" ]; then
packageVersionsPath=${packagesPreviouslySourceBuiltDir}PackageVersions.props
elif [ -f "$sourceBuiltArchive" ]; then
tar -xzf "$sourceBuiltArchive" -C /tmp PackageVersions.props
@@ -375,8 +375,9 @@ if [[ "$sourceOnly" == "true" ]]; then
if [ ! -f "$packageVersionsPath" ]; then
echo "Cannot find PackagesVersions.props. Debugging info:"
- echo " Attempted archive path: $packagesArchiveDir"
echo " Attempted custom PVP path: $CUSTOM_PACKAGES_DIR/PackageVersions.props"
+ echo " Attempted previously-source-built path: ${packagesPreviouslySourceBuiltDir}PackageVersions.props"
+ echo " Attempted archive path: $packagesArchiveDir"
exit 1
fi
diff --git a/src/SourceBuild/content/eng/Version.Details.xml b/src/SourceBuild/content/eng/Version.Details.xml
index 6099c7aa29a6..eec4a8c5b8e1 100644
--- a/src/SourceBuild/content/eng/Version.Details.xml
+++ b/src/SourceBuild/content/eng/Version.Details.xml
@@ -2,9 +2,9 @@
-
+
https://github.com/dotnet/arcade
- 91ce5946fec9f81f15f81d20e1aab63527302410
+ 020255bcf7d0b8beed7de05338d97396982ae527
diff --git a/src/SourceBuild/content/eng/Versions.props b/src/SourceBuild/content/eng/Versions.props
index 31d914e8f3fa..c589f907f574 100644
--- a/src/SourceBuild/content/eng/Versions.props
+++ b/src/SourceBuild/content/eng/Versions.props
@@ -23,8 +23,9 @@
of a .NET major or minor release, prebuilts may be needed. When the release is mature, prebuilts
are not necessary, and this property is removed from the file.
-->
- 9.0.100-preview.4.24223.1
- 9.0.100-preview.4.24223.1
+ 9.0.100-preview.5.24256.1
+ 9.0.100-preview.5.24256.1
+ 9.0.100-preview.5.24256.1
2.0.0-beta4.24126.1
diff --git a/src/SourceBuild/content/eng/allowed-vmr-binaries.txt b/src/SourceBuild/content/eng/allowed-vmr-binaries.txt
index f6f45d88a5a7..3cdbabc20116 100644
--- a/src/SourceBuild/content/eng/allowed-vmr-binaries.txt
+++ b/src/SourceBuild/content/eng/allowed-vmr-binaries.txt
@@ -38,6 +38,10 @@ src/cecil/symbols/**/Test/Resources/assemblies/*.pdb
src/cecil/symbols/**/Test/Resources/assemblies/*.dll
src/cecil/symbols/**/Test/Resources/assemblies/*.mdb
+# diagnostics
+src/diagnostics/src/tests/Microsoft.FileFormats.UnitTests/TestBinaries/**/*
+src/diagnostics/src/tests/Microsoft.SymbolStore.UnitTests/TestBinaries/**/*
+
# efcore
src/efcore/test/EFCore.Sqlite.FunctionalTests/northwind.db # https://github.com/dotnet/source-build/issues/4326
src/efcore/benchmark/EFCore.Sqlite.Benchmarks/AdventureWorks2014.db # https://github.com/dotnet/source-build/issues/4326
diff --git a/src/SourceBuild/content/eng/extract-sdk-archive.proj b/src/SourceBuild/content/eng/extract-sdk-archive.proj
new file mode 100644
index 000000000000..d170c43954ee
--- /dev/null
+++ b/src/SourceBuild/content/eng/extract-sdk-archive.proj
@@ -0,0 +1,20 @@
+
+
+
+ $(NetCurrent)
+
+
+
+
+
+
+
+
+
diff --git a/src/SourceBuild/content/eng/finish-source-only.proj b/src/SourceBuild/content/eng/finish-source-only.proj
index 24dc4a640f84..f6d93bcb29fd 100644
--- a/src/SourceBuild/content/eng/finish-source-only.proj
+++ b/src/SourceBuild/content/eng/finish-source-only.proj
@@ -10,6 +10,7 @@
+
@@ -59,13 +60,9 @@
Outputs="$(SdkSymbolsTarball)">
$(BaseIntermediateOutputPath)SdkSymbols
- $(BaseIntermediateOutputPath)Sdk
-
-
-
-
@@ -76,7 +73,6 @@
-
+ $(ProjectDirectory)build$(ShellExtension)
+
+
+ $(FlagParameterPrefix)pack $(FlagParameterPrefix)publish
+
+
+ $(BuildArgs) /p:NETCoreAppMaximumVersion=99.9
+
+ $(BuildArgs) /p:OSName=$(TargetRid.Substring(0, $(TargetRid.IndexOf("-"))))
+ $(BuildArgs) /p:PortableOSName=$(__PortableTargetOS)
+ $(BuildArgs) /p:Rid=$(TargetRid)
+ $(BuildArgs) /p:Architecture=$(TargetArchitecture)
+ $(BuildArgs) /p:DOTNET_INSTALL_DIR=$(DotNetRoot)
+
+ $(BuildArgs) /p:AspNetCoreInstallerRid=$(TargetRid)
+
+ $(BuildArgs) /p:PortableBuild=true
+ $(BuildArgs) /p:NetRuntimeRid=$(TargetRid)
+
+ $(BuildArgs) /p:SkipBuildingInstallers=true
+
+ $(BuildArgs) /p:PublicBaseURL=file:%2F%2F$(ArtifactsAssetsDir)
+
+ $(BuildArgs) /p:FallbackPublicBaseURL=https://dotnetbuilds.blob.core.windows.net/public/
+ $(BuildArgs) /p:UsePortableLinuxSharedFramework=false
+
+ $(BuildArgs) /p:PgoInstrument=true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/SourceBuild/content/repo-projects/scenario-tests.proj b/src/SourceBuild/content/repo-projects/scenario-tests.proj
index 600ff4f6006b..2462e75b64e7 100644
--- a/src/SourceBuild/content/repo-projects/scenario-tests.proj
+++ b/src/SourceBuild/content/repo-projects/scenario-tests.proj
@@ -1,4 +1,4 @@
-
+
@@ -10,4 +10,57 @@
+
+
+ false
+
+ $([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'scenario-tests'))
+ $([MSBuild]::NormalizeDirectory('$(ArtifactsTestResultsDir)', 'scenario-tests'))
+ <_ScenarioTestsNuGetConfig>$(ScenarioTestsArtifactsDir)NuGet.config
+ <_SdkNuGetConfig>$([MSBuild]::NormalizePath('$(SrcDir)', 'sdk', 'NuGet.config'))
+
+
+
+
+
+
+
+
+
+
+
+ <_CurrentDateTime>$([System.DateTime]::Now.ToString("yyyy-MM-dd_HH_mm_ss"))
+ <_TestXmlOutputPath>$(ScenarioTestsResultsDir)$(_CurrentDateTime).xml
+ <_ScenarioTestsAdditionalArgs>--xml $(_TestXmlOutputPath) --target-rid $(TargetRid) --no-cleanup --no-traits Category=MultiTFM
+
+
+ <_TestRoot>$(ScenarioTestsArtifactsDir)artifacts/
+
+
+ <_DotNetTool>$(DotNetSdkExtractDir)$([System.IO.Path]::GetFileName('$(DotNetTool)'))
+
+
+
+
+
+ <_ScenarioTestEnvVars Include="
+ TestRoot=$(_TestRoot);
+ DotNetRoot=$(DotNetSdkExtractDir);
+ TestSdkVersion=$(SourceBuiltSdkVersion);
+ AdditionalTestArgs=$(_ScenarioTestsAdditionalArgs);
+ DotNetTool=$(_DotNetTool);
+ _InitializeDotNetCli=$(DotNetSdkExtractDir)" />
+
+
+
+
+
diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/LicenseExclusions.txt b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/LicenseExclusions.txt
index 7da23e6d685b..6352e9926870 100644
--- a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/LicenseExclusions.txt
+++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/LicenseExclusions.txt
@@ -290,5 +290,10 @@ src/wpf/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FontE
src/wpf/eng/WpfArcadeSdk/tools/AvTrace/GenTraceSources.pl|proprietary-license
src/wpf/eng/WpfArcadeSdk/tools/GenXmlStringTable.pl|proprietary-license
-# False positive
+# False positive - https://github.com/dotnet/source-build/issues/4373
src/wpf/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RMPublishingDialog.RightsTable.cs|unknown-license-reference
+src/wpf/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/WindowBackdropType.cs|bsd-2-clause-views
+src/wpf/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Resources/*.xaml|bsd-2-clause-views
+src/wpf/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Resources/Theme/*.xaml|bsd-2-clause-views
+src/wpf/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/*.xaml|bsd-2-clause-views
+src/wpf/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/*.xaml|mpl-2.0
diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/ArtifactsSizes/centos.9-x64.txt b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/ArtifactsSizes/centos.9-x64.txt
index aeef656fb2b1..c65cfb575728 100644
--- a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/ArtifactsSizes/centos.9-x64.txt
+++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/ArtifactsSizes/centos.9-x64.txt
@@ -3030,8 +3030,7 @@ sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Web/Targets/Sdk.Server.targets: 1563
sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Web/tools/netx.y/Microsoft.NET.Sdk.Web.Tasks.dll: 7168
sdk/x.y.z/Sdks/Microsoft.NET.Sdk.WebAssembly/Sdk/Sdk.props: 1900
sdk/x.y.z/Sdks/Microsoft.NET.Sdk.WebAssembly/Sdk/Sdk.targets: 1745
-sdk/x.y.z/Sdks/Microsoft.NET.Sdk.WebAssembly/targets/Microsoft.NET.Sdk.WebAssembly.6_0.temp.targets: 8752
-sdk/x.y.z/Sdks/Microsoft.NET.Sdk.WebAssembly/targets/Microsoft.NET.Sdk.WebAssembly.9_0.temp.targets: 8780
+sdk/x.y.z/Sdks/Microsoft.NET.Sdk.WebAssembly/targets/Microsoft.NET.Sdk.WebAssembly.9_0.temp.targets: 3715
sdk/x.y.z/Sdks/Microsoft.NET.Sdk.WebAssembly/tools/netx.y/Microsoft.NET.Sdk.WebAssembly.Tasks.dll: 5632
sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Worker/Sdk/Sdk.props: 1258
sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Worker/Sdk/Sdk.targets: 869
diff --git a/src/SourceBuild/content/test/scenario-tests/Directory.Build.targets b/src/SourceBuild/content/test/scenario-tests/Directory.Build.targets
new file mode 100644
index 000000000000..56dccb4796da
--- /dev/null
+++ b/src/SourceBuild/content/test/scenario-tests/Directory.Build.targets
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/SourceBuild/content/test/scenario-tests/scenario-tests.proj b/src/SourceBuild/content/test/scenario-tests/scenario-tests.proj
new file mode 100644
index 000000000000..410ac2f54c4c
--- /dev/null
+++ b/src/SourceBuild/content/test/scenario-tests/scenario-tests.proj
@@ -0,0 +1,17 @@
+
+
+
+ $(NetCurrent)
+ true
+
+
+
+
+
+
+
+
diff --git a/src/SourceBuild/content/test/tests.proj b/src/SourceBuild/content/test/tests.proj
index 582cb92574da..2f8df9ccb659 100644
--- a/src/SourceBuild/content/test/tests.proj
+++ b/src/SourceBuild/content/test/tests.proj
@@ -1,10 +1,29 @@
+
+ <_RunScenarioTests>true
+
+
+ <_RunScenarioTests Condition="'$(BuildArchitecture.ToLowerInvariant())' != '$(TargetArchitecture.ToLowerInvariant())'">false
+
+
+ <_RunScenarioTests Condition="'$(BuildOS)' != 'windows' and '$(DotNetBuildSourceOnly)' != 'true' and '$(__PortableTargetOS.ToLowerInvariant())' != '$(TargetOS.ToLowerInvariant())'">false
+
+
+ <_RunScenarioTests Condition="'$(UseOfficialBuildVersioning)' == 'false'">false
+
+
+
+
-
\ No newline at end of file
+
diff --git a/src/SourceBuild/patches/aspnetcore/0001-InternalServerError.patch b/src/SourceBuild/patches/aspnetcore/0001-InternalServerError.patch
new file mode 100644
index 000000000000..3e2677270121
--- /dev/null
+++ b/src/SourceBuild/patches/aspnetcore/0001-InternalServerError.patch
@@ -0,0 +1,30 @@
+From 8d5c6986d052ea34fdb3fe0a1affcc7a26f56222 Mon Sep 17 00:00:00 2001
+From: Viktor Hofer
+Date: Tue, 7 May 2024 11:11:47 +0200
+Subject: [PATCH] Update InternalServerError.cs
+
+The license header was missing which caused unified-build to fail.
+
+> D:\a\_work\1\vmr\src\aspnetcore\src\Http\Http.Results\src\InternalServerError.cs(1,1): error IDE0073: A source file is missing a required header. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0073) [D:\a\_work\1\vmr\src\aspnetcore\src\Http\Http.Results\src\Microsoft.AspNetCore.Http.Results.csproj]
+---
+ src/Http/Http.Results/src/InternalServerError.cs | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/Http/Http.Results/src/InternalServerError.cs b/src/Http/Http.Results/src/InternalServerError.cs
+index d9e0aa1a1e08..d6fb8a13b93a 100644
+--- a/src/Http/Http.Results/src/InternalServerError.cs
++++ b/src/Http/Http.Results/src/InternalServerError.cs
+@@ -1,3 +1,6 @@
++// Licensed to the .NET Foundation under one or more agreements.
++// The .NET Foundation licenses this file to you under the MIT license.
++
+ using System.Reflection;
+ using Microsoft.AspNetCore.Builder;
+ using Microsoft.AspNetCore.Http.Metadata;
+@@ -50,4 +53,4 @@ static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, Endpoi
+
+ builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status500InternalServerError, typeof(void)));
+ }
+-}
+\ No newline at end of file
++}
diff --git a/src/SourceBuild/patches/roslyn/0001-ambiguous-call-site.patch b/src/SourceBuild/patches/roslyn/0001-ambiguous-call-site.patch
new file mode 100644
index 000000000000..ed342cd3151f
--- /dev/null
+++ b/src/SourceBuild/patches/roslyn/0001-ambiguous-call-site.patch
@@ -0,0 +1,45 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Michael Simons
+Date: Thu, 2 May 2024 21:52:54 +0000
+Subject: [PATCH] Avoid ambiguous call site
+
+---
+ .../GenerateType/AbstractGenerateTypeService.Editor.cs | 4 ++--
+ .../Workspace/Core/CodeGeneration/CodeGenerationHelpers.cs | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/Features/Core/Portable/GenerateType/AbstractGenerateTypeService.Editor.cs b/src/Features/Core/Portable/GenerateType/AbstractGenerateTypeService.Editor.cs
+index 8adaaeda551..b099e092c7b 100644
+--- a/src/Features/Core/Portable/GenerateType/AbstractGenerateTypeService.Editor.cs
++++ b/src/Features/Core/Portable/GenerateType/AbstractGenerateTypeService.Editor.cs
+@@ -525,7 +525,7 @@ private async Task> GetGenerateIntoContainin
+ AddFoldersToNamespaceContainers(containerList, folders);
+
+ containers = [.. containerList];
+- includeUsingsOrImports = string.Join(".", [.. containerList]);
++ includeUsingsOrImports = string.Join(".", containerList);
+ }
+
+ // Case 4 : If the type is generated into the same VB project or
+@@ -539,7 +539,7 @@ private async Task> GetGenerateIntoContainin
+ // Populate the ContainerList
+ AddFoldersToNamespaceContainers(containerList, folders);
+ containers = [.. containerList];
+- includeUsingsOrImports = string.Join(".", [.. containerList]);
++ includeUsingsOrImports = string.Join(".", containerList);
+ if (!string.IsNullOrWhiteSpace(rootNamespaceOfTheProjectGeneratedInto))
+ {
+ includeUsingsOrImports = string.IsNullOrEmpty(includeUsingsOrImports)
+diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/CodeGeneration/CodeGenerationHelpers.cs b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/CodeGeneration/CodeGenerationHelpers.cs
+index 3839eb370eb..8d272db6b1b 100644
+--- a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/CodeGeneration/CodeGenerationHelpers.cs
++++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/CodeGeneration/CodeGenerationHelpers.cs
+@@ -71,7 +71,7 @@ internal static class CodeGenerationHelpers
+ break;
+ }
+
+- name = string.Join(".", [.. names]);
++ name = string.Join(".", names);
+ }
+ else
+ {
diff --git a/src/SourceBuild/patches/scenario-tests/0001-Disable-Aspire-scenario-test.patch b/src/SourceBuild/patches/scenario-tests/0001-Disable-Aspire-scenario-test.patch
new file mode 100644
index 000000000000..f2a5f62d399e
--- /dev/null
+++ b/src/SourceBuild/patches/scenario-tests/0001-Disable-Aspire-scenario-test.patch
@@ -0,0 +1,23 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Matt Thalman
+Date: Tue, 30 Apr 2024 08:34:08 -0500
+Subject: [PATCH] Disable Aspire scenario test
+
+Backport: https://github.com/dotnet/sdk/pull/40485
+---
+ .../SdkTemplateTests.cs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Microsoft.DotNet.ScenarioTests.SdkTemplateTests/SdkTemplateTests.cs b/src/Microsoft.DotNet.ScenarioTests.SdkTemplateTests/SdkTemplateTests.cs
+index c43fdd6..bb5c52d 100644
+--- a/src/Microsoft.DotNet.ScenarioTests.SdkTemplateTests/SdkTemplateTests.cs
++++ b/src/Microsoft.DotNet.ScenarioTests.SdkTemplateTests/SdkTemplateTests.cs
+@@ -217,7 +217,7 @@ public class SdkTemplateTests : IClassFixture
+ newTest.Execute(_sdkHelper, _scenarioTestInput.TestRoot, "wasm-tools");
+ }
+
+- [Fact]
++ //[Fact]
+ [Trait("Category", "Workload")]
+ [Trait("Category", "InProgress")]
+ public void VerifyAspireTemplate()
diff --git a/src/SourceBuild/patches/scenario-tests/0002-Disable-WPF-scenario-test.patch b/src/SourceBuild/patches/scenario-tests/0002-Disable-WPF-scenario-test.patch
new file mode 100644
index 000000000000..ba5dfa3aee6b
--- /dev/null
+++ b/src/SourceBuild/patches/scenario-tests/0002-Disable-WPF-scenario-test.patch
@@ -0,0 +1,23 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Matt Thalman
+Date: Tue, 30 Apr 2024 10:21:32 -0500
+Subject: [PATCH] Disable WPF scenario test
+
+Backport: https://github.com/dotnet/source-build/issues/4361
+---
+ .../SdkTemplateTests.cs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Microsoft.DotNet.ScenarioTests.SdkTemplateTests/SdkTemplateTests.cs b/src/Microsoft.DotNet.ScenarioTests.SdkTemplateTests/SdkTemplateTests.cs
+index c43fdd6..35279a9 100644
+--- a/src/Microsoft.DotNet.ScenarioTests.SdkTemplateTests/SdkTemplateTests.cs
++++ b/src/Microsoft.DotNet.ScenarioTests.SdkTemplateTests/SdkTemplateTests.cs
+@@ -84,7 +84,7 @@ public class SdkTemplateTests : IClassFixture
+ newTest.Execute(_sdkHelper, _scenarioTestInput.TestRoot);
+ }
+
+- [Theory]
++ //[Theory]
+ [InlineData(DotNetLanguage.CSharp)]
+ [InlineData(DotNetLanguage.VB)]
+ [Trait("Category", "Offline")]
diff --git a/src/SourceBuild/patches/vstest/0001-Make-IDE0073-silent.patch b/src/SourceBuild/patches/vstest/0001-Make-IDE0073-silent.patch
new file mode 100644
index 000000000000..d4f43d6f30fc
--- /dev/null
+++ b/src/SourceBuild/patches/vstest/0001-Make-IDE0073-silent.patch
@@ -0,0 +1,25 @@
+From 7e4258f7c5ae7260d904962f60ce8e35c4fa4402 Mon Sep 17 00:00:00 2001
+From: Viktor Hofer
+Date: Fri, 3 May 2024 17:24:56 +0200
+Subject: [PATCH] Make IDE0073 silent
+
+Backport / PR that fixes this: https://github.com/microsoft/vstest/pull/5020
+
+---
+ .editorconfig | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/.editorconfig b/.editorconfig
+index b78e7a35..e2e9c09f 100644
+--- a/.editorconfig
++++ b/.editorconfig
+@@ -393,7 +393,7 @@ dotnet_diagnostic.IDE0052.severity = silent
+
+ # IDE1006: Naming Styles
+ dotnet_diagnostic.IDE1006.severity = warning
+-dotnet_diagnostic.IDE0073.severity = warning
++dotnet_diagnostic.IDE0073.suggestion = warning
+
+ # Naming rules
+
+--
diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/Microsoft.DotNet.Common.ItemTemplates.csproj b/template_feed/Microsoft.DotNet.Common.ItemTemplates/Microsoft.DotNet.Common.ItemTemplates.csproj
index 8ba6cbdf93ab..be96eb81715e 100644
--- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/Microsoft.DotNet.Common.ItemTemplates.csproj
+++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/Microsoft.DotNet.Common.ItemTemplates.csproj
@@ -20,6 +20,7 @@
Template
True
true
+ true
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.9.0/Microsoft.DotNet.Common.ProjectTemplates.9.0.csproj b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.9.0/Microsoft.DotNet.Common.ProjectTemplates.9.0.csproj
index d0af0f4c2c4e..09b566757f3a 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.9.0/Microsoft.DotNet.Common.ProjectTemplates.9.0.csproj
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.9.0/Microsoft.DotNet.Common.ProjectTemplates.9.0.csproj
@@ -20,6 +20,7 @@
Template
True
$(NoWarn);NU1507
+ true