diff --git a/.gitattributes b/.gitattributes
index 2f46e347155a..020c8aaad53a 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -67,3 +67,5 @@
*.verified.txt text eol=lf working-tree-encoding=UTF-8
*.verified.xml text eol=lf working-tree-encoding=UTF-8
*.verified.json text eol=lf working-tree-encoding=UTF-8
+
+src/SourceBuild/patches/**/*.patch text eol=lf
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 42149dcfd38c..9098a02a7f11 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -167,74 +167,74 @@
https://github.com/dotnet/roslyn
6908aead3a8b313798c381d5e435e9e6068301a7
-
+
https://github.com/nuget/nuget.client
- a4a2e3f31ddc2adb52ebd3204ea6f650d89caf3f
+ 38f10f632d8d1ffca92ae9f7a0c9e10a92451973
-
+
https://github.com/nuget/nuget.client
- a4a2e3f31ddc2adb52ebd3204ea6f650d89caf3f
+ 38f10f632d8d1ffca92ae9f7a0c9e10a92451973
-
+
https://github.com/nuget/nuget.client
- a4a2e3f31ddc2adb52ebd3204ea6f650d89caf3f
+ 38f10f632d8d1ffca92ae9f7a0c9e10a92451973
-
+
https://github.com/nuget/nuget.client
- a4a2e3f31ddc2adb52ebd3204ea6f650d89caf3f
+ 38f10f632d8d1ffca92ae9f7a0c9e10a92451973
-
+
https://github.com/nuget/nuget.client
- a4a2e3f31ddc2adb52ebd3204ea6f650d89caf3f
+ 38f10f632d8d1ffca92ae9f7a0c9e10a92451973
-
+
https://github.com/nuget/nuget.client
- a4a2e3f31ddc2adb52ebd3204ea6f650d89caf3f
+ 38f10f632d8d1ffca92ae9f7a0c9e10a92451973
-
+
https://github.com/nuget/nuget.client
- a4a2e3f31ddc2adb52ebd3204ea6f650d89caf3f
+ 38f10f632d8d1ffca92ae9f7a0c9e10a92451973
-
+
https://github.com/nuget/nuget.client
- a4a2e3f31ddc2adb52ebd3204ea6f650d89caf3f
+ 38f10f632d8d1ffca92ae9f7a0c9e10a92451973
-
+
https://github.com/nuget/nuget.client
- a4a2e3f31ddc2adb52ebd3204ea6f650d89caf3f
+ 38f10f632d8d1ffca92ae9f7a0c9e10a92451973
-
+
https://github.com/nuget/nuget.client
- a4a2e3f31ddc2adb52ebd3204ea6f650d89caf3f
+ 38f10f632d8d1ffca92ae9f7a0c9e10a92451973
-
+
https://github.com/nuget/nuget.client
- a4a2e3f31ddc2adb52ebd3204ea6f650d89caf3f
+ 38f10f632d8d1ffca92ae9f7a0c9e10a92451973
-
+
https://github.com/nuget/nuget.client
- a4a2e3f31ddc2adb52ebd3204ea6f650d89caf3f
+ 38f10f632d8d1ffca92ae9f7a0c9e10a92451973
-
+
https://github.com/nuget/nuget.client
- a4a2e3f31ddc2adb52ebd3204ea6f650d89caf3f
+ 38f10f632d8d1ffca92ae9f7a0c9e10a92451973
-
+
https://github.com/nuget/nuget.client
- a4a2e3f31ddc2adb52ebd3204ea6f650d89caf3f
+ 38f10f632d8d1ffca92ae9f7a0c9e10a92451973
-
+
https://github.com/nuget/nuget.client
- a4a2e3f31ddc2adb52ebd3204ea6f650d89caf3f
+ 38f10f632d8d1ffca92ae9f7a0c9e10a92451973
-
+
https://github.com/nuget/nuget.client
- a4a2e3f31ddc2adb52ebd3204ea6f650d89caf3f
+ 38f10f632d8d1ffca92ae9f7a0c9e10a92451973
-
+
https://github.com/nuget/nuget.client
- a4a2e3f31ddc2adb52ebd3204ea6f650d89caf3f
+ 38f10f632d8d1ffca92ae9f7a0c9e10a92451973
https://github.com/microsoft/vstest
diff --git a/eng/Versions.props b/eng/Versions.props
index 5a0a69bd8422..b6ef688680b0 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -146,18 +146,18 @@
- 6.14.0-preview.1.11
- 6.14.0-preview.1.11
- 6.14.0-preview.1.11
- 6.14.0-preview.1.11
- 6.14.0-preview.1.11
- 6.14.0-preview.1.11
- 6.14.0-preview.1.11
- 6.14.0-preview.1.11
- 6.14.0-preview.1.11
- 6.14.0-preview.1.11
- 6.14.0-preview.1.11
- 6.14.0-preview.1.11
+ 6.14.0-preview.1.27
+ 6.14.0-preview.1.27
+ 6.14.0-preview.1.27
+ 6.14.0-preview.1.27
+ 6.14.0-preview.1.27
+ 6.14.0-preview.1.27
+ 6.14.0-preview.1.27
+ 6.14.0-preview.1.27
+ 6.14.0-preview.1.27
+ 6.14.0-preview.1.27
+ 6.14.0-preview.1.27
+ 6.14.0-preview.1.27
diff --git a/src/SourceBuild/patches/fsharp/0002-React-to-NuGet-package-pruning-warnings.patch b/src/SourceBuild/patches/fsharp/0002-React-to-NuGet-package-pruning-warnings.patch
new file mode 100644
index 000000000000..55a24217e6a0
--- /dev/null
+++ b/src/SourceBuild/patches/fsharp/0002-React-to-NuGet-package-pruning-warnings.patch
@@ -0,0 +1,51 @@
+From 33ac19502896addb6693d606ca6e7351ec6610ec Mon Sep 17 00:00:00 2001
+From: Viktor Hofer
+Date: Mon, 10 Feb 2025 15:00:47 +0100
+Subject: [PATCH] React to NuGet package pruning warnings
+
+Backport: https://github.com/dotnet/fsharp/pull/18304
+
+---
+ eng/Versions.props | 1 -
+ src/fsc/fsc.targets | 9 ++++++---
+ 2 files changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/eng/Versions.props b/eng/Versions.props
+index 3b36ad6a7..ce0f5f5ac 100644
+--- a/eng/Versions.props
++++ b/eng/Versions.props
+@@ -87,7 +87,6 @@
+ $(SystemPackageVersionVersion)
+ 6.1.0
+ $(SystemPackageVersionVersion)
+- 4.5.0
+ 1.6.0
+
+ 4.11.0-2.24264.2
+diff --git a/src/fsc/fsc.targets b/src/fsc/fsc.targets
+index 1c67ceb39..dc80ab5c4 100644
+--- a/src/fsc/fsc.targets
++++ b/src/fsc/fsc.targets
+@@ -45,13 +45,16 @@
+
+
+
++
++
++
++
++
++
+
+
+
+
+-
+-
+-
+
+
+
+--
+2.47.1.windows.2
+
diff --git a/src/SourceBuild/patches/nuget-client/0001-React-to-NuGet-package-pruning-warnings.patch b/src/SourceBuild/patches/nuget-client/0001-React-to-NuGet-package-pruning-warnings.patch
new file mode 100644
index 000000000000..fc8ee9c9e50a
--- /dev/null
+++ b/src/SourceBuild/patches/nuget-client/0001-React-to-NuGet-package-pruning-warnings.patch
@@ -0,0 +1,86 @@
+From 61efe20e89726378bdf14443443f0c2da45c053d Mon Sep 17 00:00:00 2001
+From: Viktor Hofer
+Date: Mon, 10 Feb 2025 15:04:23 +0100
+Subject: [PATCH] React to NuGet package pruning warnings
+
+Backport: https://github.com/NuGet/NuGet.Client/pull/6261
+
+---
+ src/NuGet.Core/NuGet.Common/NuGet.Common.csproj | 2 +-
+ src/NuGet.Core/NuGet.LibraryModel/NuGet.LibraryModel.csproj | 2 +-
+ .../NuGet.PackageManagement/NuGet.PackageManagement.csproj | 3 ++-
+ src/NuGet.Core/NuGet.Packaging/NuGet.Packaging.csproj | 2 +-
+ src/NuGet.Core/NuGet.ProjectModel/NuGet.ProjectModel.csproj | 2 +-
+ 5 files changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/src/NuGet.Core/NuGet.Common/NuGet.Common.csproj b/src/NuGet.Core/NuGet.Common/NuGet.Common.csproj
+index 75ed5accd..c1815cb84 100644
+--- a/src/NuGet.Core/NuGet.Common/NuGet.Common.csproj
++++ b/src/NuGet.Core/NuGet.Common/NuGet.Common.csproj
+@@ -27,7 +27,7 @@
+
+
+
+-
++
+
+
+
+diff --git a/src/NuGet.Core/NuGet.LibraryModel/NuGet.LibraryModel.csproj b/src/NuGet.Core/NuGet.LibraryModel/NuGet.LibraryModel.csproj
+index c20604eb9..21db96e44 100644
+--- a/src/NuGet.Core/NuGet.LibraryModel/NuGet.LibraryModel.csproj
++++ b/src/NuGet.Core/NuGet.LibraryModel/NuGet.LibraryModel.csproj
+@@ -17,7 +17,7 @@
+
+
+
+-
++
+
+
+
+diff --git a/src/NuGet.Core/NuGet.PackageManagement/NuGet.PackageManagement.csproj b/src/NuGet.Core/NuGet.PackageManagement/NuGet.PackageManagement.csproj
+index fd1bd0cd7..d355f79d4 100644
+--- a/src/NuGet.Core/NuGet.PackageManagement/NuGet.PackageManagement.csproj
++++ b/src/NuGet.Core/NuGet.PackageManagement/NuGet.PackageManagement.csproj
+@@ -22,12 +22,13 @@
+
+
+
+-
++
+
+
+
+
+
++
+
+
+
+diff --git a/src/NuGet.Core/NuGet.Packaging/NuGet.Packaging.csproj b/src/NuGet.Core/NuGet.Packaging/NuGet.Packaging.csproj
+index 1a140570e..df0f64c7d 100644
+--- a/src/NuGet.Core/NuGet.Packaging/NuGet.Packaging.csproj
++++ b/src/NuGet.Core/NuGet.Packaging/NuGet.Packaging.csproj
+@@ -66,7 +66,7 @@
+ This package is a dependency of System.Security.Cryptography.Pkcs
+ When it is upgraded to a newer version, try deleting the below PackageReference
+ -->
+-
++
+
+
+
+diff --git a/src/NuGet.Core/NuGet.ProjectModel/NuGet.ProjectModel.csproj b/src/NuGet.Core/NuGet.ProjectModel/NuGet.ProjectModel.csproj
+index bec334cd4..43308010a 100644
+--- a/src/NuGet.Core/NuGet.ProjectModel/NuGet.ProjectModel.csproj
++++ b/src/NuGet.Core/NuGet.ProjectModel/NuGet.ProjectModel.csproj
+@@ -20,7 +20,7 @@
+
+
+
+-
++
+
+
+
diff --git a/src/SourceBuild/patches/nuget-client/0001-use-the-documented-artifact-ext.patch b/src/SourceBuild/patches/nuget-client/0001-use-the-documented-artifact-ext.patch
deleted file mode 100644
index 39081266220a..000000000000
--- a/src/SourceBuild/patches/nuget-client/0001-use-the-documented-artifact-ext.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 62c4b5f114850d39efdca3df3b9ee83cc0f424ff Mon Sep 17 00:00:00 2001
-From: Jeremy Koritzinsky
-Date: Tue, 21 Jan 2025 16:16:49 -0800
-Subject: [PATCH 1/2] Use the documented Artifact extension point to add
- artifacts
-
-The Artifact extension point handles symbol packages automatically for source-build, and it automatically gets support for new features like Artifact Visibility (required for https://github.com/dotnet/sdk/pull/46063)
-Backport: https://github.com/NuGet/NuGet.Client/pull/6233
----
- eng/Publishing.props | 11 +++--------
- 1 file changed, 3 insertions(+), 8 deletions(-)
-
-diff --git a/eng/Publishing.props b/eng/Publishing.props
-index 38810c73428..1175200dd59 100644
---- a/eng/Publishing.props
-+++ b/eng/Publishing.props
-@@ -1,11 +1,6 @@
-
--
-
--
-- <_SymbolsPackages Include="$(ArtifactsDir)nupkgs/*.symbols.nupkg" />
--
-+
-
--
--
-\ No newline at end of file
-+
-
-From 9072cb03cb5c2958df318f59389547caa5de2c8a Mon Sep 17 00:00:00 2001
-From: Jeremy Koritzinsky
-Date: Wed, 22 Jan 2025 10:07:47 -0800
-Subject: [PATCH 2/2] Formatting and PR feedback
-
----
- eng/Publishing.props | 14 ++++++++------
- 1 file changed, 8 insertions(+), 6 deletions(-)
-
-diff --git a/eng/Publishing.props b/eng/Publishing.props
-index 1175200dd59..41f498d4d4a 100644
---- a/eng/Publishing.props
-+++ b/eng/Publishing.props
-@@ -1,6 +1,8 @@
--
--
--
--
--
-+
-+
-+
-+
-+
-+
-+
diff --git a/src/SourceBuild/patches/razor/0001-React-to-NuGet-package-pruning-warnings.patch b/src/SourceBuild/patches/razor/0001-React-to-NuGet-package-pruning-warnings.patch
new file mode 100644
index 000000000000..b8c844d9414c
--- /dev/null
+++ b/src/SourceBuild/patches/razor/0001-React-to-NuGet-package-pruning-warnings.patch
@@ -0,0 +1,24 @@
+From 287f933c0f361fb128b634c6a0315b1042fb8a8c Mon Sep 17 00:00:00 2001
+From: Viktor Hofer
+Date: Mon, 10 Feb 2025 15:26:10 +0100
+Subject: [PATCH] React to NuGet package pruning warnings
+
+Backport: https://github.com/dotnet/razor/pull/11471
+
+---
+ .../Microsoft.AspNetCore.Razor.Utilities.Shared.csproj | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Shared/Microsoft.AspNetCore.Razor.Utilities.Shared/Microsoft.AspNetCore.Razor.Utilities.Shared.csproj b/src/Shared/Microsoft.AspNetCore.Razor.Utilities.Shared/Microsoft.AspNetCore.Razor.Utilities.Shared.csproj
+index 8c00b4d35f..73431d922b 100644
+--- a/src/Shared/Microsoft.AspNetCore.Razor.Utilities.Shared/Microsoft.AspNetCore.Razor.Utilities.Shared.csproj
++++ b/src/Shared/Microsoft.AspNetCore.Razor.Utilities.Shared/Microsoft.AspNetCore.Razor.Utilities.Shared.csproj
+@@ -13,7 +13,7 @@
+
+
+
+-
++
+
+
+
diff --git a/src/SourceBuild/patches/runtime/0002-React-to-NuGet-package-pruning-warnings.patch b/src/SourceBuild/patches/runtime/0002-React-to-NuGet-package-pruning-warnings.patch
new file mode 100644
index 000000000000..a0ebe588d2da
--- /dev/null
+++ b/src/SourceBuild/patches/runtime/0002-React-to-NuGet-package-pruning-warnings.patch
@@ -0,0 +1,740 @@
+From 66fb701949fa9d79664e80d383c0385c2a823a85 Mon Sep 17 00:00:00 2001
+From: Viktor Hofer
+Date: Mon, 10 Feb 2025 18:40:38 +0100
+Subject: [PATCH] React to NuGet package pruning warnings
+
+Backport: https://github.com/dotnet/runtime/pull/112357
+
+---
+ eng/packaging.targets | 603 +++++++++---------
+ ...Extensions.Diagnostics.Abstractions.csproj | 7 +-
+ ...oft.Extensions.Logging.Abstractions.csproj | 5 +
+ ...icrosoft.Extensions.Logging.Console.csproj | 5 +-
+ .../ref/System.Formats.Nrbf.csproj | 4 +-
+ .../ref/System.Memory.Data.csproj | 2 +-
+ .../System.Security.Cryptography.Pkcs.csproj | 2 +-
+ 7 files changed, 314 insertions(+), 314 deletions(-)
+
+diff --git a/eng/packaging.targets b/eng/packaging.targets
+index c64ccfb2fcc..e03c40614b4 100644
+--- a/eng/packaging.targets
++++ b/eng/packaging.targets
+@@ -1,309 +1,294 @@
+-
+-
+-
+-
+- true
+-
+- true
+- $(ApiCompatNetCoreAppBaselineVersion)
+-
+- $(BeforePack);IncludeAnalyzersInPackage;AddNETStandardCompatErrorFileForPackaging
+- $(TargetsForTfmSpecificContentInPackage);AddRuntimeSpecificFilesToPackage;IncludeProjectReferencesWithPackAttributeInPackage
+-
+- false
+- true
+-
+- true
+- $(MSBuildThisFileDirectory)useSharedDesignerContext.txt
+-
+-
+- true
+- PACKAGE.md
+- PACKAGE.md
+- $(BeforePack);ValidatePackageReadmeExists
+-
+-
+- true
+- true
+-
+-
+- false
+-
+-
+-
+-
+- true
+-
+- $(NoWarn);CP0003
+-
+-
+-
+-
+-
+-
+-
+-
+- <_FrameworkAssemblyReferences Include="$(MSBuildProjectName)"
+- TargetFramework="$(NetFrameworkMinimum)" />
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+- $(NoWarn);NU5128
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+- $(TargetDir)$(TargetName).pdb
+- <_packageTargetRuntime>$(TargetPlatformIdentifier.ToLowerInvariant().Replace('windows', 'win'))
+- <_targetFrameworkWithoutSuffix>$(TargetFramework)
+- <_targetFrameworkWithoutSuffix Condition="$(TargetFramework.Contains('-'))">$(TargetFramework.SubString(0, $(TargetFramework.IndexOf('-'))))
+-
+-
+-
+-
+-
+-
+- <_RuntimeSymbolPath Include="@(TfmRuntimeSpecificPackageFile->'%(RootDir)%(Directory)%(FileName).pdb')" Condition="'%(TfmRuntimeSpecificPackageFile.Extension)' == '.dll'" KeepMetadata="None" />
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+- <_TargetPathsToSymbols Include="@(_AnalyzerFile)" TargetPath="/%(_AnalyzerFile.PackagePath)" Condition="%(_AnalyzerFile.IsSymbol)" />
+-
+-
+-
+-
+- <_MultiTargetRoslynComponentTargetsTemplate>$(MSBuildThisFileDirectory)MultiTargetRoslynComponent.targets.template
+- $(IntermediateOutputPath)MultiTargetRoslynComponent.targets
+- true
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+- <_MultiTargetRoslynComponentTargetPrefix>$(PackageId.Replace('.', '_'))
+- Disable$(PackageId.Replace('.', ''))SourceGenerator
+-
+-
+-
+-
+-
+-
+-
+-
+- <_NETStandardCompatErrorFilePath>$(BaseIntermediateOutputPath)netstandardcompaterror_%(NETStandardCompatError.Identity).targets
+- <_NETStandardCompatErrorFileTarget>NETStandardCompatError_$(PackageId.Replace('.', '_'))_$([System.String]::new('%(NETStandardCompatError.Supported)').Replace('.', '_'))
+- <_NETStandardCompatErrorFileContent>
+-
+-
+-
+-
+-]]>
+-
+- <_NETStandardCompatErrorPlaceholderFilePackagePath>buildTransitive$([System.IO.Path]::DirectorySeparatorChar)%(NETStandardCompatError.Supported)
+-
+-
+-
+-
+-
+- <_PackageBuildFile Include="@(None->Metadata('PackagePath'));
+- @(Content->Metadata('PackagePath'))" />
+- <_PackageBuildFile PackagePathWithoutFilename="$([System.IO.Path]::GetDirectoryName('%(Identity)'))" />
+-
+-
+-
+-
+-
+-
+-
+-
+-
+- <_referringTargetFramework>$(TargetFramework)
+- <_referringTargetFramework Condition="'$(PackageUsePlatformTargeting)' != 'true' and $(TargetFramework.Contains('-'))">$(TargetFramework.SubString(0, $(TargetFramework.IndexOf('-'))))
+-
+-
+-
+-
+- <_projectReferenceCopyLocalPaths Include="@(ReferenceCopyLocalPaths->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference')->WithMetadataValue('Pack', 'true'))" />
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+- <_referenceAssemblyPaths Include="@(_projectReferenceCopyLocalPaths->WithMetadataValue('Extension', '.dll')->WithMetadataValue('IncludeReferenceAssemblyInPackage', 'true')->Metadata('ReferenceAssembly'))" />
+- <_referenceAssemblyPaths Include="@(_projectReferenceCopyLocalPaths->WithMetadataValue('Extension', '.xml')->WithMetadataValue('IncludeReferenceAssemblyInPackage', 'true'))" />
+-
+-
+-
+-
+-
+-
+-
+- net
+- netframework
+-
+-
+-
+-
+-
+-
+- <_BuildOutputPackageFile Include="$(OutputPath)**"
+- Exclude="$(OutputPath)publish\**;
+- $(OutputPath)" />
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
++
++
++
++
++ true
++
++ true
++ $(ApiCompatNetCoreAppBaselineVersion)
++
++ $(BeforePack);IncludeAnalyzersInPackage;AddNETStandardCompatErrorFileForPackaging
++ $(TargetsForTfmSpecificContentInPackage);AddRuntimeSpecificFilesToPackage;IncludeProjectReferencesWithPackAttributeInPackage
++
++ false
++ true
++
++ true
++ $(MSBuildThisFileDirectory)useSharedDesignerContext.txt
++
++
++ true
++ PACKAGE.md
++ PACKAGE.md
++ $(BeforePack);ValidatePackageReadmeExists
++
++
++ true
++ true
++
++
++ false
++
++
++
++
++ true
++
++ $(NoWarn);CP0003
++
++
++
++
++
++
++
++
++ <_FrameworkAssemblyReferences Include="$(MSBuildProjectName)"
++ TargetFramework="$(NetFrameworkMinimum)" />
++
++
++
++
++
++
++
++
++
++
++
++ $(NoWarn);NU5128
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++ $(TargetDir)$(TargetName).pdb
++ <_packageTargetRuntime>$(TargetPlatformIdentifier.ToLowerInvariant().Replace('windows', 'win'))
++ <_targetFrameworkWithoutSuffix>$(TargetFramework)
++ <_targetFrameworkWithoutSuffix Condition="$(TargetFramework.Contains('-'))">$(TargetFramework.SubString(0, $(TargetFramework.IndexOf('-'))))
++
++
++
++
++
++
++ <_RuntimeSymbolPath Include="@(TfmRuntimeSpecificPackageFile->'%(RootDir)%(Directory)%(FileName).pdb')" Condition="'%(TfmRuntimeSpecificPackageFile.Extension)' == '.dll'" KeepMetadata="None" />
++
++
++
++
++
++
++
++
++
++
++
++
++
++ <_TargetPathsToSymbols Include="@(_AnalyzerFile)" TargetPath="/%(_AnalyzerFile.PackagePath)" Condition="%(_AnalyzerFile.IsSymbol)" />
++
++
++
++
++ <_MultiTargetRoslynComponentTargetsTemplate>$(MSBuildThisFileDirectory)MultiTargetRoslynComponent.targets.template
++ $(IntermediateOutputPath)MultiTargetRoslynComponent.targets
++ true
++
++
++
++
++
++
++
++
++
++
++
++
++ <_MultiTargetRoslynComponentTargetPrefix>$(PackageId.Replace('.', '_'))
++ Disable$(PackageId.Replace('.', ''))SourceGenerator
++
++
++
++
++
++
++
++
++ <_NETStandardCompatErrorFilePath>$(BaseIntermediateOutputPath)netstandardcompaterror_%(NETStandardCompatError.Identity).targets
++ <_NETStandardCompatErrorFileTarget>NETStandardCompatError_$(PackageId.Replace('.', '_'))_$([System.String]::new('%(NETStandardCompatError.Supported)').Replace('.', '_'))
++ <_NETStandardCompatErrorFileContent>
++
++
++
++
++]]>
++
++ <_NETStandardCompatErrorPlaceholderFilePackagePath>buildTransitive$([System.IO.Path]::DirectorySeparatorChar)%(NETStandardCompatError.Supported)
++
++
++
++
++
++ <_PackageBuildFile Include="@(None->Metadata('PackagePath'));
++ @(Content->Metadata('PackagePath'))" />
++ <_PackageBuildFile PackagePathWithoutFilename="$([System.IO.Path]::GetDirectoryName('%(Identity)'))" />
++
++
++
++
++
++
++
++
++
++ <_referringTargetFramework>$(TargetFramework)
++ <_referringTargetFramework Condition="'$(PackageUsePlatformTargeting)' != 'true' and $(TargetFramework.Contains('-'))">$(TargetFramework.SubString(0, $(TargetFramework.IndexOf('-'))))
++
++
++
++
++ <_projectReferenceCopyLocalPaths Include="@(ReferenceCopyLocalPaths->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference')->WithMetadataValue('Pack', 'true'))" />
++
++
++
++
++
++
++
++
++
++
++ <_referenceAssemblyPaths Include="@(_projectReferenceCopyLocalPaths->WithMetadataValue('Extension', '.dll')->WithMetadataValue('IncludeReferenceAssemblyInPackage', 'true')->Metadata('ReferenceAssembly'))" />
++ <_referenceAssemblyPaths Include="@(_projectReferenceCopyLocalPaths->WithMetadataValue('Extension', '.xml')->WithMetadataValue('IncludeReferenceAssemblyInPackage', 'true'))" />
++
++
++
++
++
++
++
++ net
++ netframework
++
++
++
++
++
++
++ <_BuildOutputPackageFile Include="$(OutputPath)**"
++ Exclude="$(OutputPath)publish\**;
++ $(OutputPath)" />
++
++
++
++
++
++
++
++
++
++
++
++
+diff --git a/src/libraries/Microsoft.Extensions.Diagnostics.Abstractions/ref/Microsoft.Extensions.Diagnostics.Abstractions.csproj b/src/libraries/Microsoft.Extensions.Diagnostics.Abstractions/ref/Microsoft.Extensions.Diagnostics.Abstractions.csproj
+index f7b93cc292f..63b868b9850 100644
+--- a/src/libraries/Microsoft.Extensions.Diagnostics.Abstractions/ref/Microsoft.Extensions.Diagnostics.Abstractions.csproj
++++ b/src/libraries/Microsoft.Extensions.Diagnostics.Abstractions/ref/Microsoft.Extensions.Diagnostics.Abstractions.csproj
+@@ -1,4 +1,5 @@
+
++
+
+ $(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum)
+
+@@ -13,7 +14,11 @@
+
+
+
+-
+
+
++
++
++
++
++
+
+diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/ref/Microsoft.Extensions.Logging.Abstractions.csproj b/src/libraries/Microsoft.Extensions.Logging.Abstractions/ref/Microsoft.Extensions.Logging.Abstractions.csproj
+index ff6d90a86e9..9d4c9f5ccf4 100644
+--- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/ref/Microsoft.Extensions.Logging.Abstractions.csproj
++++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/ref/Microsoft.Extensions.Logging.Abstractions.csproj
+@@ -1,4 +1,5 @@
+
++
+
+ $(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum)
+
+@@ -9,6 +10,10 @@
+
+
+
++
++
++
+
+
++
+
+diff --git a/src/libraries/Microsoft.Extensions.Logging.Console/ref/Microsoft.Extensions.Logging.Console.csproj b/src/libraries/Microsoft.Extensions.Logging.Console/ref/Microsoft.Extensions.Logging.Console.csproj
+index 537f64f4fe4..f0353dbde22 100644
+--- a/src/libraries/Microsoft.Extensions.Logging.Console/ref/Microsoft.Extensions.Logging.Console.csproj
++++ b/src/libraries/Microsoft.Extensions.Logging.Console/ref/Microsoft.Extensions.Logging.Console.csproj
+@@ -18,11 +18,14 @@
+
+
+
+-
+
+
+
+
+
+
++
++
++
++
+
+diff --git a/src/libraries/System.Formats.Nrbf/ref/System.Formats.Nrbf.csproj b/src/libraries/System.Formats.Nrbf/ref/System.Formats.Nrbf.csproj
+index 092064146e4..1fcac9238bc 100644
+--- a/src/libraries/System.Formats.Nrbf/ref/System.Formats.Nrbf.csproj
++++ b/src/libraries/System.Formats.Nrbf/ref/System.Formats.Nrbf.csproj
+@@ -1,4 +1,5 @@
+
++
+
+ $(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum)
+ false
+@@ -8,7 +9,7 @@
+
+
+
+-
++
+
+
+
+@@ -21,4 +22,5 @@
+
+
+
++
+
+diff --git a/src/libraries/System.Memory.Data/ref/System.Memory.Data.csproj b/src/libraries/System.Memory.Data/ref/System.Memory.Data.csproj
+index 7d9b3481ecd..5f4d300cdab 100644
+--- a/src/libraries/System.Memory.Data/ref/System.Memory.Data.csproj
++++ b/src/libraries/System.Memory.Data/ref/System.Memory.Data.csproj
+@@ -13,7 +13,7 @@
+
+
+
+-
++
+
+
+
+diff --git a/src/libraries/System.Security.Cryptography.Pkcs/src/System.Security.Cryptography.Pkcs.csproj b/src/libraries/System.Security.Cryptography.Pkcs/src/System.Security.Cryptography.Pkcs.csproj
+index 168ec510fd0..de6981cf994 100644
+--- a/src/libraries/System.Security.Cryptography.Pkcs/src/System.Security.Cryptography.Pkcs.csproj
++++ b/src/libraries/System.Security.Cryptography.Pkcs/src/System.Security.Cryptography.Pkcs.csproj
+@@ -675,7 +675,7 @@ System.Security.Cryptography.Pkcs.EnvelopedCms
+
+
+
+-
++
+
+
+
diff --git a/src/SourceBuild/patches/vstest/0001-React-to-NuGet-package-pruning-warnings.patch b/src/SourceBuild/patches/vstest/0001-React-to-NuGet-package-pruning-warnings.patch
new file mode 100644
index 000000000000..71df20d7b61f
--- /dev/null
+++ b/src/SourceBuild/patches/vstest/0001-React-to-NuGet-package-pruning-warnings.patch
@@ -0,0 +1,46 @@
+From 2783ecf7488da808c853b6be4f3a741cfafc7869 Mon Sep 17 00:00:00 2001
+From: Viktor Hofer
+Date: Mon, 10 Feb 2025 14:57:53 +0100
+Subject: [PATCH] React to NuGet package pruning warnings
+
+Backport: https://github.com/microsoft/vstest/pull/15008
+
+---
+ .../Microsoft.TestPlatform.CoreUtilities.csproj | 7 ++-----
+ .../Microsoft.TestPlatform.ObjectModel.csproj | 5 ++---
+ 2 files changed, 4 insertions(+), 8 deletions(-)
+
+diff --git a/src/Microsoft.TestPlatform.CoreUtilities/Microsoft.TestPlatform.CoreUtilities.csproj b/src/Microsoft.TestPlatform.CoreUtilities/Microsoft.TestPlatform.CoreUtilities.csproj
+index 919bb26e7..866225a77 100644
+--- a/src/Microsoft.TestPlatform.CoreUtilities/Microsoft.TestPlatform.CoreUtilities.csproj
++++ b/src/Microsoft.TestPlatform.CoreUtilities/Microsoft.TestPlatform.CoreUtilities.csproj
+@@ -17,11 +17,8 @@
+
+
+
+-
+-
+-
+-
+-
++
++
+
+
+
+diff --git a/src/Microsoft.TestPlatform.ObjectModel/Microsoft.TestPlatform.ObjectModel.csproj b/src/Microsoft.TestPlatform.ObjectModel/Microsoft.TestPlatform.ObjectModel.csproj
+index 034807a58..1675d4cb0 100644
+--- a/src/Microsoft.TestPlatform.ObjectModel/Microsoft.TestPlatform.ObjectModel.csproj
++++ b/src/Microsoft.TestPlatform.ObjectModel/Microsoft.TestPlatform.ObjectModel.csproj
+@@ -35,9 +35,8 @@
+
+
+
+-
++ Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net48')) != 'true' and '$(TargetFrameworkIdentifier)' == '.NETFramework'" />
++
+
+
+
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/FrameworkPackages/FrameworkPackages.cs b/src/Tasks/Microsoft.NET.Build.Tasks/FrameworkPackages/FrameworkPackages.cs
index 558ea870e41c..7cad5e407067 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/FrameworkPackages/FrameworkPackages.cs
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/FrameworkPackages/FrameworkPackages.cs
@@ -77,11 +77,6 @@ public static FrameworkPackages[] GetFrameworkPackages(NuGetFramework framework,
{
var frameworkPackages = new List();
- if (frameworkReferences.Length == 0)
- {
- frameworkReferences = [DefaultFrameworkKey];
- }
-
foreach (var frameworkReference in frameworkReferences)
{
var frameworkKey = GetFrameworkKey(frameworkReference);
diff --git a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToResolveConflicts.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToResolveConflicts.cs
index e1bc0efcb098..ba3e1703ae9d 100644
--- a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToResolveConflicts.cs
+++ b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToResolveConflicts.cs
@@ -116,6 +116,10 @@ public void CompileConflictsAreNotRemovedFromRuntimeDepsAssets()
testProject.PackageReferences.Add(new TestPackageReference("Microsoft.AspNetCore.Mvc.Razor", "2.1.0"));
+ // This test relies on a package that would be pruned. This doesn't seem to be a customer scenario, it looks like it was
+ // an easier way to test that files that were removed
+ testProject.AdditionalProperties["RestoreEnablePackagePruning"] = "false";
+
var testAsset = _testAssetsManager.CreateTestProject(testProject);
var buildCommand = new BuildCommand(testAsset);
diff --git a/test/dotnet-list-package.Tests/GivenDotnetListPackage.cs b/test/dotnet-list-package.Tests/GivenDotnetListPackage.cs
index 025dcb71a9c2..4a624a23e706 100644
--- a/test/dotnet-list-package.Tests/GivenDotnetListPackage.cs
+++ b/test/dotnet-list-package.Tests/GivenDotnetListPackage.cs
@@ -179,6 +179,10 @@ public static void Main(string[] args)
};
testProject.PackageReferences.Add(new TestPackageReference("NewtonSoft.Json", "9.0.1"));
+
+ // Disable package pruning so that there are still transitive dependencies to test the command
+ testProject.AdditionalProperties["RestoreEnablePackagePruning"] = "false";
+
var testAsset = _testAssetsManager.CreateTestProject(testProject);
var projectDirectory = Path.Combine(testAsset.Path, testProject.Name);