Skip to content

Commit e62ad52

Browse files
authored
[automated] Merge branch 'release/10.0.1xx' => 'release/10.0.2xx' (#51312)
2 parents 4a500fa + ffb7660 commit e62ad52

File tree

11 files changed

+371
-303
lines changed

11 files changed

+371
-303
lines changed

NuGet.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<clear />
55
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
66
<!-- Begin: Package sources from dotnet-dotnet -->
7-
<add key="darc-pub-dotnet-dotnet-862de94" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-dotnet-862de94f/nuget/v3/index.json" />
7+
<add key="darc-pub-dotnet-dotnet-03ebd38" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-dotnet-03ebd38e/nuget/v3/index.json" />
88
<!-- End: Package sources from dotnet-dotnet -->
99
<!-- Begin: Package sources from microsoft-testfx -->
1010
<!-- End: Package sources from microsoft-testfx -->

eng/Version.Details.props

Lines changed: 72 additions & 72 deletions
Large diffs are not rendered by default.

eng/Version.Details.xml

Lines changed: 205 additions & 205 deletions
Large diffs are not rendered by default.

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
}
2222
},
2323
"msbuild-sdks": {
24-
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25514.103",
25-
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25514.103",
24+
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25515.107",
25+
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25515.107",
2626
"Microsoft.Build.NoTargets": "3.7.0",
2727
"Microsoft.Build.Traversal": "3.4.0",
2828
"Microsoft.WixToolset.Sdk": "5.0.2-dotnet.2737382"

src/Tasks/Microsoft.NET.Build.Tasks/GetPackagesToPrune.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -235,12 +235,6 @@ static Dictionary<string, NuGetVersion> LoadPackagesToPruneFromFrameworkPackages
235235
{
236236
var nugetFramework = new NuGetFramework(targetFrameworkIdentifier, Version.Parse(targetFrameworkVersion));
237237

238-
// FrameworkPackages just has data for .NET Framework 4.6.1, so turn on fallback for anything greater than that so it will resolve to the .NET Framework 4.6.1 data
239-
if (!acceptNearestMatch && nugetFramework.IsDesktop() && nugetFramework.Version > new Version(4,6,1))
240-
{
241-
acceptNearestMatch = true;
242-
}
243-
244238
var frameworkPackages = FrameworkPackages.GetFrameworkPackages(nugetFramework, [frameworkReference], acceptNearestMatch)
245239
.SelectMany(packages => packages)
246240
.ToDictionary(kvp => kvp.Key, kvp => kvp.Value);

src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.PackTool.targets

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ NOTE: This file is imported from the following contexts, so be aware when writin
5454
<_ToolRidsAreOnlyShims Condition="'$(RuntimeIdentifiers)' == '' and $(PackAsToolShimRuntimeIdentifiers) != '' ">true</_ToolRidsAreOnlyShims>
5555
<_UserSpecifiedToolPackageRids Condition="'$(ToolPackageRuntimeIdentifiers)' != ''">$(ToolPackageRuntimeIdentifiers)</_UserSpecifiedToolPackageRids>
5656
<_UserSpecifiedToolPackageRids Condition="'$(_UserSpecifiedToolPackageRids)' == ''">$(RuntimeIdentifiers)</_UserSpecifiedToolPackageRids>
57-
<_HasRIDSpecificTools Condition=" '$(_UserSpecifiedToolPackageRids)' != '' ">true</_HasRIDSpecificTools>
58-
<_HasRIDSpecificTools Condition="'$(_HasRIDSpecificTools)' == ''">false</_HasRIDSpecificTools>
57+
<CreateRidSpecificToolPackages Condition="'$(CreateRidSpecificToolPackages)' == '' And '$(_UserSpecifiedToolPackageRids)' != '' ">true</CreateRidSpecificToolPackages>
58+
<CreateRidSpecificToolPackages Condition="'$(CreateRidSpecificToolPackages)' == ''">false</CreateRidSpecificToolPackages>
5959

6060
<!-- NOTE: this line is load-bearing. This impacts Restore behaviors significantly, so we can't prevent the import of these targets _in general_. -->
6161
<RuntimeIdentifiers Condition="'$(PackAsToolShimRuntimeIdentifiers)' != ''">$(_UserSpecifiedToolPackageRids);$(PackAsToolShimRuntimeIdentifiers)</RuntimeIdentifiers>
@@ -65,7 +65,7 @@ NOTE: This file is imported from the following contexts, so be aware when writin
6565
<!-- We need to know if the inner builds are _intended_ to be AOT even if we then explicitly disable AOT for the outer builds.
6666
Knowing this lets us correctly decide to create the RID-specific inner tools or not when packaging the outer tool. -->
6767
<_InnerToolsPublishAot>false</_InnerToolsPublishAot>
68-
<_InnerToolsPublishAot Condition="$(_HasRIDSpecificTools) and '$(PublishAot)' == 'true'">true</_InnerToolsPublishAot>
68+
<_InnerToolsPublishAot Condition="$(CreateRidSpecificToolPackages) and '$(PublishAot)' == 'true'">true</_InnerToolsPublishAot>
6969

7070
<!-- determining if it's safe to change publish-related properties for this evaluation. We can only override default publishing
7171
behavior if
@@ -164,7 +164,7 @@ NOTE: This file is imported from the following contexts, so be aware when writin
164164
</PropertyGroup>
165165

166166
<!-- inner-build tool packages get a RID suffix -->
167-
<PropertyGroup Condition="'$(_HasRIDSpecificTools)' != '' And '$(RuntimeIdentifier)' != ''">
167+
<PropertyGroup Condition="$(CreateRidSpecificToolPackages) And '$(RuntimeIdentifier)' != ''">
168168
<PackageId>$(PackageId).$(RuntimeIdentifier)</PackageId>
169169
</PropertyGroup>
170170
</Target>
@@ -390,7 +390,7 @@ NOTE: This file is imported from the following contexts, so be aware when writin
390390
<Target Name="SetDotnetToolPackageType" Returns="$(_ToolPackageType)">
391391

392392
<PropertyGroup>
393-
<_ToolPackageType Condition="'$(RuntimeIdentifier)' != '' And '$(_HasRIDSpecificTools)' != ''">DotnetToolRidPackage</_ToolPackageType>
393+
<_ToolPackageType Condition="'$(RuntimeIdentifier)' != '' And $(CreateRidSpecificToolPackages)">DotnetToolRidPackage</_ToolPackageType>
394394
<_ToolPackageType Condition="'$(_ToolPackageType)' == ''">DotnetTool</_ToolPackageType>
395395
</PropertyGroup>
396396

@@ -427,7 +427,7 @@ NOTE: This file is imported from the following contexts, so be aware when writin
427427
We can't call this for AOT'd tools because we can't AOT cross-architecture and cross-platform in .NET today. -->
428428
<Target Name="_CreateRIDSpecificToolPackages"
429429
Condition="'$(RuntimeIdentifier)' == ''
430-
and $(_HasRIDSpecificTools)
430+
and $(CreateRidSpecificToolPackages)
431431
and !$(_InnerToolsPublishAot)">
432432
<PropertyGroup>
433433
<_PackageRids>$(ToolPackageRuntimeIdentifiers)</_PackageRids>

src/Workloads/Manifests/Microsoft.NET.Workload.Mono.Toolchain.Current.Manifest/WorkloadManifest.targets.in

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@
9191
<UsingBlazorAOTWorkloadManifest>true</UsingBlazorAOTWorkloadManifest>
9292
</PropertyGroup>
9393

94+
<ItemGroup>
95+
<KnownWebAssemblySdkPack Update="@(KnownWebAssemblySdkPack)">
96+
<WebAssemblySdkPackVersion>$(_RuntimePackInWorkloadVersionCurrent)</WebAssemblySdkPackVersion>
97+
</KnownWebAssemblySdkPack>
98+
</ItemGroup>
99+
94100
<!-- Support for "browser" target platform identifier -->
95101
<PropertyGroup Condition="'$(TargetPlatformIdentifier)' == 'browser' and $([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '8.0'))">
96102
<TargetPlatformSupported>true</TargetPlatformSupported>
@@ -220,7 +226,6 @@
220226

221227
<PropertyGroup Condition="'$(TargetsCurrent)' == 'true' and '$(_MonoWorkloadTargetsMobile)' == 'true'">
222228
<_MonoWorkloadRuntimePackPackageVersion>$(_RuntimePackInWorkloadVersionCurrent)</_MonoWorkloadRuntimePackPackageVersion>
223-
<_KnownWebAssemblySdkPackVersion>$(_RuntimePackInWorkloadVersionCurrent)</_KnownWebAssemblySdkPackVersion>
224229
</PropertyGroup>
225230

226231
<ItemGroup Condition="'$(TargetsCurrent)' == 'true' and '$(_MonoWorkloadTargetsMobile)' == 'true'">
@@ -235,10 +240,6 @@
235240
<KnownFrameworkReference Update="Microsoft.NETCore.App">
236241
<TargetingPackVersion Condition="'%(KnownFrameworkReference.TargetFramework)' == '${NetVersion}.0'">$(_MonoWorkloadRuntimePackPackageVersion)</TargetingPackVersion>
237242
</KnownFrameworkReference>
238-
<KnownWebAssemblySdkPack Update="@(KnownWebAssemblySdkPack)">
239-
<WebAssemblySdkPackVersion Condition="'%(KnownWebAssemblySdkPack.TargetFramework)' == '${NetVersion}.0'">$(_KnownWebAssemblySdkPackVersion)</WebAssemblySdkPackVersion>
240-
</KnownWebAssemblySdkPack>
241243
</ItemGroup>
242244

243-
244245
</Project>

src/Workloads/Manifests/Microsoft.NET.Workload.Mono.Toolchain.net9.Manifest/WorkloadManifest.targets.in

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@
7272

7373
<PropertyGroup Condition="'$(TargetsNet9)' == 'true' and '$(_MonoWorkloadTargetsMobile)' == 'true'">
7474
<_MonoWorkloadRuntimePackPackageVersion>$(_RuntimePackInWorkloadVersion9)</_MonoWorkloadRuntimePackPackageVersion>
75-
<_KnownWebAssemblySdkPackVersion>$(_RuntimePackInWorkloadVersion9)</_KnownWebAssemblySdkPackVersion>
7675
</PropertyGroup>
7776

7877
<ItemGroup Condition="'$(TargetsNet9)' == 'true' and '$(_MonoWorkloadTargetsMobile)' == 'true'">
@@ -87,9 +86,6 @@
8786
<KnownFrameworkReference Update="Microsoft.NETCore.App">
8887
<TargetingPackVersion Condition="'%(KnownFrameworkReference.TargetFramework)' == 'net9.0'">$(_MonoWorkloadRuntimePackPackageVersion)</TargetingPackVersion>
8988
</KnownFrameworkReference>
90-
<KnownWebAssemblySdkPack Update="@(KnownWebAssemblySdkPack)">
91-
<WebAssemblySdkPackVersion Condition="'%(KnownWebAssemblySdkPack.TargetFramework)' == 'net9.0'">$(_KnownWebAssemblySdkPackVersion)</WebAssemblySdkPackVersion>
92-
</KnownWebAssemblySdkPack>
9389
</ItemGroup>
9490

9591

test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAnAppWithoutTransitiveProjectRefs.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ public void It_cleans_the_project_successfully_with_static_graph_and_isolation()
8282
"1.exe",
8383
"1.pdb",
8484
"1.exe.config",
85+
"System.Diagnostics.DiagnosticSource.dll",
8586
};
8687

8788
foreach (var targetFramework in targetFrameworks)

test/Microsoft.NET.Build.Tests/GivenThatWeWantToResolveConflicts.cs

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,8 @@ public void PlatformPackagesCanBePruned(bool prunePackages)
329329
[InlineData("netstandard1.1", false)]
330330
[InlineData("netstandard1.0", false)]
331331
[InlineData("net451", false)]
332-
[InlineData("net462")]
333-
[InlineData("net481")]
332+
[InlineData("net462", false)]
333+
[InlineData("net481", false)]
334334
// These target frameworks shouldn't prune packages unless explicitly enabled
335335
[InlineData("net9.0", false, "")]
336336
[InlineData("netstandard2.1", false, "")]
@@ -492,6 +492,45 @@ public void WithMultitargetedProjects_PruningsDefaultsAreApplies(string framewor
492492
}
493493
}
494494

495+
[Fact]
496+
public void WithMultitargetedProject_NETFrameworkIsNotPruned()
497+
{
498+
var project = new TestProject("MultitargetedPruning")
499+
{
500+
TargetFrameworks = ToolsetInfo.CurrentTargetFramework + ";net462",
501+
};
502+
project.PackageReferences.Add(new TestPackageReference("System.ValueTuple", "4.6.1"));
503+
project.SourceFiles.Add("Test.cs", @"
504+
public class Class1
505+
{
506+
public (int, int) GetTuple() => (1, 2);
507+
}
508+
");
509+
var testAsset = _testAssetsManager.CreateTestProject(project, identifier: "NETFrameworkIsNotPruned");
510+
var buildCommand = new BuildCommand(testAsset);
511+
buildCommand.Execute().Should().Pass();
512+
var assetsFilePath = Path.Combine(buildCommand.GetBaseIntermediateDirectory().FullName, "project.assets.json");
513+
var lockFile = LockFileUtilities.GetLockFile(assetsFilePath, new NullLogger());
514+
515+
foreach (var lockFileTarget in lockFile.Targets)
516+
{
517+
var valueTupleLibrary = lockFileTarget.Libraries.Where(library => library.Name.Equals("System.ValueTuple", StringComparison.OrdinalIgnoreCase)).Single();
518+
var runtimeAssemblies = valueTupleLibrary.RuntimeAssemblies.Where(a => !Path.GetFileName(a.Path).Equals("_._"));
519+
var compileTimeAssemblies = valueTupleLibrary.CompileTimeAssemblies.Where(a => !Path.GetFileName(a.Path).Equals("_._"));
520+
521+
if (lockFileTarget.TargetFramework.Framework.Equals(".NETFramework", StringComparison.OrdinalIgnoreCase))
522+
{
523+
runtimeAssemblies.Should().NotBeEmpty();
524+
compileTimeAssemblies.Should().NotBeEmpty();
525+
}
526+
else
527+
{
528+
runtimeAssemblies.Should().BeEmpty();
529+
compileTimeAssemblies.Should().BeEmpty();
530+
}
531+
}
532+
}
533+
495534
static List<KeyValuePair<string, string>> ParsePrunePackageReferenceJson(string json)
496535
{
497536
List<KeyValuePair<string, string>> ret = new();

0 commit comments

Comments
 (0)