Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"tools": {
"dotnet": "6.0.100-rc.1.21419.15",
"dotnet": "6.0.100-rc.1.21417.19",
"runtimes": {
"dotnet": [
"$(VSRedistCommonNetCoreSharedFrameworkx6460PackageVersion)"
Expand Down
1 change: 0 additions & 1 deletion src/Layout/redist/targets/OverlaySdkOnLKG.targets
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
<OverrideAndCreateBundledNETCoreAppPackageVersion
Stage0MicrosoftNETCoreAppRefPackageVersionPath="$(_DotNetHiveRoot)/sdk/$(Stage0SdkVersion)/Microsoft.NETCoreSdk.BundledVersions.props"
MicrosoftNETCoreAppRefPackageVersion="$(MicrosoftNETCoreAppRefPackageVersion)"
NewSDKVersion="$(Version)"
OutputPath="$(SdkOutputDirectory)/Microsoft.NETCoreSdk.BundledVersions.props"/>

<Copy SourceFiles="@(ToolsetToOverlay)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ namespace Microsoft.DotNet.Build.Tasks
/// If there is a change depended on the latest runtime. Without override the runtime version in BundledNETCoreAppPackageVersion
/// we would need to somehow get this change in without the test, and then insertion dotnet/installer
/// and then update the stage 0 back.
///
/// Override NETCoreSdkVersion to stage 0 sdk version like 6.0.100-dev
///
/// Use a task to override since it was generated as a string literal replace anyway.
/// And using C# can have better error when anything goes wrong.
Expand All @@ -35,24 +33,20 @@ public sealed class OverrideAndCreateBundledNETCoreAppPackageVersion : Task
[Required] public string Stage0MicrosoftNETCoreAppRefPackageVersionPath { get; set; }

[Required] public string MicrosoftNETCoreAppRefPackageVersion { get; set; }
[Required] public string NewSDKVersion { get; set; }

[Required] public string OutputPath { get; set; }

public override bool Execute()
{
File.WriteAllText(OutputPath,
ExecuteInternal(
File.ReadAllText(Stage0MicrosoftNETCoreAppRefPackageVersionPath),
MicrosoftNETCoreAppRefPackageVersion,
NewSDKVersion));
ExecuteInternal(File.ReadAllText(Stage0MicrosoftNETCoreAppRefPackageVersionPath),
MicrosoftNETCoreAppRefPackageVersion));
return true;
}

public static string ExecuteInternal(
string stage0MicrosoftNETCoreAppRefPackageVersionContent,
string microsoftNETCoreAppRefPackageVersion,
string newSDKVersion)
string microsoftNETCoreAppRefPackageVersion)
{
var projectXml = XDocument.Parse(stage0MicrosoftNETCoreAppRefPackageVersionContent);

Expand All @@ -62,10 +56,8 @@ public static string ExecuteInternal(

var isSDKServicing = IsSDKServicing(propertyGroup.Element(ns + "NETCoreSdkVersion").Value);

propertyGroup.Element(ns + "NETCoreSdkVersion").Value = newSDKVersion;

var originalBundledNETCoreAppPackageVersion =
propertyGroup.Element(ns + "BundledNETCoreAppPackageVersion").Value;
propertyGroup.Element(ns + "BundledNETCoreAppPackageVersion").Value;
propertyGroup.Element(ns + "BundledNETCoreAppPackageVersion").Value = microsoftNETCoreAppRefPackageVersion;

void CheckAndReplaceElement(XElement element)
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/HelixTasks/HelixTasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.Build" Version="15.7.179" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="15.7.179" />
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
<PackageReference Include="System.Reflection.Metadata" Version="1.7.0" />
<PackageReference Include="NuGet.ProjectModel" Version="$(NuGetProjectModelVersion)" />
</ItemGroup>
Expand Down
12 changes: 6 additions & 6 deletions src/Tests/Microsoft.NET.Build.Tests/WorkloadTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -263,14 +263,14 @@ public void It_should_get_suggested_workload_by_GetRequiredWorkloads_target()

getValuesCommand.GetValues()
.Should()
.BeEquivalentTo("android");
.BeEquivalentTo("microsoft-android-sdk-full");
}

[Theory]
[InlineData("net6.0-android;net6.0-ios", "net6.0-android;net6.0-ios", "android;android-aot")]
[InlineData("net6.0", "net6.0;net6.0-android;net6.0-ios", "macos;android-aot")]
[InlineData("net6.0;net6.0-ios", "net6.0;net6.0-android", "macos;android-aot")]
[InlineData("net6.0", "net6.0", "macos")]
[Theory(Skip = "https://github.com/dotnet/sdk/issues/19866")]
[InlineData("net6.0-android;net6.0-ios", "net6.0-android;net6.0-ios", "microsoft-android-sdk-full;microsoft-ios-sdk-full")]
[InlineData("net6.0", "net6.0;net6.0-android;net6.0-ios", "microsoft-android-sdk-full;microsoft-ios-sdk-full")]
[InlineData("net6.0;net6.0-ios", "net6.0;net6.0-android", "microsoft-android-sdk-full;microsoft-ios-sdk-full")]
[InlineData("net6.0", "net6.0", null)]
public void Given_multi_target_It_should_get_suggested_workload_by_GetRequiredWorkloads_target(string mainTfm, string referencingTfm, string expected)
{
var mainProject = new TestProject()
Expand Down