Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
4ceffac
Update dependencies from https://dev.azure.com/dnceng/internal/_git/d…
dotnet-bot Oct 4, 2022
9304de7
Update dependencies from https://dev.azure.com/dnceng/internal/_git/d…
dotnet-bot Oct 4, 2022
767b5da
Update dependencies from https://dev.azure.com/dnceng/internal/_git/d…
dotnet-bot Oct 4, 2022
f8a6332
Update dependencies from https://dev.azure.com/dnceng/internal/_git/d…
dotnet-bot Oct 4, 2022
0b1f363
Update dependencies from https://dev.azure.com/dnceng/internal/_git/d…
dotnet-bot Oct 5, 2022
7e5d1a3
Update dependencies from https://dev.azure.com/dnceng/internal/_git/d…
dotnet-bot Oct 5, 2022
1d6fb00
Update dependencies from https://dev.azure.com/dnceng/internal/_git/d…
dotnet-bot Oct 5, 2022
92aadbf
Update dependencies from https://dev.azure.com/dnceng/internal/_git/d…
dotnet-bot Oct 5, 2022
b3c3ccf
Update dependencies from https://dev.azure.com/dnceng/internal/_git/d…
dotnet-bot Oct 6, 2022
c3d474b
Update dependencies from https://dev.azure.com/dnceng/internal/_git/d…
dotnet-bot Oct 6, 2022
ad97694
Update dependencies from https://dev.azure.com/dnceng/internal/_git/d…
dotnet-bot Oct 6, 2022
9c7b63a
Update dependencies from https://dev.azure.com/dnceng/internal/_git/d…
dotnet-bot Oct 6, 2022
3ce3389
Update dependencies from https://dev.azure.com/dnceng/internal/_git/d…
dotnet-bot Oct 6, 2022
dfd54d6
Update dependencies from https://dev.azure.com/dnceng/internal/_git/d…
dotnet-bot Oct 7, 2022
3c5f21e
Update dependencies from https://dev.azure.com/dnceng/internal/_git/d…
dotnet-bot Oct 7, 2022
d8a0253
Update dependencies from https://dev.azure.com/dnceng/internal/_git/d…
dotnet-bot Oct 7, 2022
0473a70
Update dependencies from https://dev.azure.com/dnceng/internal/_git/d…
dotnet-bot Oct 10, 2022
55ba1dc
Update dependencies from https://dev.azure.com/dnceng/internal/_git/d…
dotnet-bot Oct 10, 2022
eb22a6c
Merge in 'release/6.0.1xx' changes
dotnet-bot Oct 10, 2022
84c9920
Update dependencies from https://dev.azure.com/dnceng/internal/_git/d…
dotnet-bot Oct 12, 2022
07add3c
Update dependencies from https://dev.azure.com/dnceng/internal/_git/d…
dotnet-bot Oct 12, 2022
7e788ae
Update dependencies from https://dev.azure.com/dnceng/internal/_git/d…
dotnet-bot Oct 13, 2022
dd2a352
Update dependencies from https://dev.azure.com/dnceng/internal/_git/d…
dotnet-bot Oct 13, 2022
bbf780d
Merge in 'release/6.0.1xx' changes
dotnet-bot Oct 14, 2022
8e3d02b
Merged PR 26433: [internal/release/6.0.1xx] Update dependencies from …
dotnet-bot Oct 14, 2022
b520962
Update dependencies from https://dev.azure.com/dnceng/internal/_git/d…
dotnet-bot Oct 14, 2022
cf5a486
Update dependencies from https://dev.azure.com/dnceng/internal/_git/d…
dotnet-bot Oct 17, 2022
27dfdd9
Merged PR 26773: [internal/release/6.0.1xx] Update dependencies from …
dotnet-bot Oct 17, 2022
d4e90ae
Merged PR 26808: [internal/release/6.0.1xx] Update dependencies from …
dotnet-bot Oct 17, 2022
1b66d2b
Merged PR 26821: [internal/release/6.0.1xx] Update dependencies from …
dotnet-bot Oct 18, 2022
b01d3d9
Merge in 'release/6.0.1xx' changes
dotnet-bot Oct 18, 2022
f364505
Merged PR 26852: [internal/release/6.0.1xx] Update dependencies from …
dotnet-bot Oct 18, 2022
d2aa8e2
Merged PR 26869: [internal/release/6.0.1xx] Update dependencies from …
dotnet-bot Oct 19, 2022
eea343b
Merged PR 26882: [internal/release/6.0.1xx] Update dependencies from …
dotnet-bot Oct 19, 2022
c287c60
Merged PR 26906: [internal/release/6.0.1xx] Update dependencies from …
dotnet-bot Oct 19, 2022
4c81383
Merged PR 26990: [internal/release/6.0.1xx] Update dependencies from …
dotnet-bot Oct 23, 2022
ffccd7e
Merged PR 26999: [internal/release/6.0.1xx] Update dependencies from …
dotnet-bot Oct 24, 2022
8f6e48c
Merged PR 27006: [internal/release/6.0.1xx] Update dependencies from …
dotnet-bot Oct 24, 2022
1ac9e48
Merge commit '8f6e48c18dda13f4ddb7b447d4602629099d3639' into internal…
vseanreesermsft Nov 8, 2022
bb0e04c
Merge pull request #28944 from vseanreesermsft/internal-merge-6.0.1xx…
mmitche Nov 9, 2022
57b5a97
[release/6.0.1xx] Backport Add Blazor SWA Baseline Mismatched Assets …
TanayParikh Nov 10, 2022
59af34f
ResolveReadyToRunCompilers: map non-portable rids when targetOS is de…
ayakael Nov 15, 2022
17a524f
[release/6.0.1xx] Update dependencies from dotnet/arcade (#29124)
dotnet-maestro[bot] Nov 19, 2022
c04cfe3
Merge branch 'merge/release/6.0.1xx-to-release/6.0.3xx' of https://gi…
Nov 22, 2022
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
6 changes: 6 additions & 0 deletions src/RazorSdk/update-test-baselines.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
$RepoRoot= Resolve-Path "$PSScriptRoot/../.."

$TestProjects = "Microsoft.NET.Sdk.Razor.Tests", "Microsoft.NET.Sdk.BlazorWebAssembly.Tests" |
ForEach-Object { Join-Path -Path "$RepoRoot/src/Tests/" -ChildPath $_ };

$TestProjects | ForEach-Object { dotnet test --no-build -l "console;verbosity=normal" $_ -e ASPNETCORE_TEST_BASELINES=true --filter AspNetCore=BaselineTest }
53 changes: 44 additions & 9 deletions src/Tasks/Microsoft.NET.Build.Tasks/ResolveReadyToRunCompilers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,21 +143,14 @@ private bool ValidateCrossgen2Support()

bool version5 = crossgen2PackVersion.Major < 6;
bool isSupportedTarget = ExtractTargetPlatformAndArchitecture(_targetRuntimeIdentifier, out _targetPlatform, out _targetArchitecture);
string targetOS = _targetPlatform switch
{
"linux" => "linux",
"linux-musl" => "linux",
"osx" => "osx",
"win" => "windows",
_ => null
};

// In .NET 5 Crossgen2 supported only the following host->target compilation scenarios:
// win-x64 -> win-x64
// linux-x64 -> linux-x64
// linux-musl-x64 -> linux-musl-x64
string targetOS = null;
isSupportedTarget = isSupportedTarget &&
targetOS != null &&
GetCrossgen2TargetOS(out targetOS) &&
(!version5 || _targetRuntimeIdentifier == _hostRuntimeIdentifier) &&
GetCrossgen2ComponentsPaths(version5);

Expand Down Expand Up @@ -188,6 +181,48 @@ private bool ValidateCrossgen2Support()
return true;
}

private bool GetCrossgen2TargetOS(out string targetOS)
{
targetOS = null;

// Determine targetOS based on target rid.
// Use the runtime graph to support non-portable target rids.
var runtimeGraph = new RuntimeGraphCache(this).GetRuntimeGraph(RuntimeGraphPath);
string portablePlatform = NuGetUtils.GetBestMatchingRid(
runtimeGraph,
_targetPlatform,
new[] { "linux", "linux-musl", "osx", "win" },
out _);

// For source-build, allow the bootstrap SDK rid to be unknown to the runtime repo graph.
if (portablePlatform == null && _targetRuntimeIdentifier == _hostRuntimeIdentifier)
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
portablePlatform = "linux";
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
portablePlatform = "win";
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
portablePlatform = "osx";
}
}

targetOS = portablePlatform switch
{
"linux" => "linux",
"linux-musl" => "linux",
"osx" => "osx",
"win" => "windows",
_ => null
};

return targetOS != null;
}

private ITaskItem GetNETCoreAppRuntimePack()
{
return GetNETCoreAppPack(RuntimePacks, MetadataKeys.FrameworkName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
using Xunit.Abstractions;
using Microsoft.NET.TestFramework.ProjectConstruction;
using Newtonsoft.Json.Linq;
using NuGet.Versioning;

namespace Microsoft.NET.Build.Tests
{
Expand Down Expand Up @@ -188,7 +189,7 @@ public void It_creates_a_documentation_file(string language)
[InlineData("vb", false)]
public void It_allows_us_to_override_the_documentation_file_name(string language, bool setGenerateDocumentationFileProperty)
{
var testAsset = CreateDocumentationFileLibraryAsset(setGenerateDocumentationFileProperty ? (bool?)true : null, "TestLibDoc.xml", language, "OverrideDocFileName");
var testAsset = CreateDocumentationFileLibraryAsset(setGenerateDocumentationFileProperty ? (bool?)true : null, "TestLibDoc.xml", language, "OverrideDocFileName");

var libraryProjectDirectory = Path.Combine(testAsset.TestRoot, "TestLibrary");

Expand Down Expand Up @@ -217,7 +218,8 @@ public void It_allows_us_to_override_the_documentation_file_name(string language
};

// vb uses DocumentationFile relative to the IntermediateOutputPath
if (language != "vb") {
if (language != "vb")
{
expectedProjectDirectoryFiles.Add("TestLibDoc.xml");
}

Expand Down Expand Up @@ -391,6 +393,11 @@ public void It_implicitly_defines_compilation_constants_for_the_target_framework
[InlineData(new[] { "11.11", "12.12", "13.13" }, "android", "12.12", new[] { "ANDROID", "ANDROID12_12", "ANDROID11_11_OR_GREATER", "ANDROID12_12_OR_GREATER" })]
public void It_implicitly_defines_compilation_constants_for_the_target_platform(string[] sdkSupportedTargetPlatformVersion, string targetPlatformIdentifier, string targetPlatformVersion, string[] expectedDefines)
{
// Skip Test if SDK is < 7.0.200
var sdkVersion = SemanticVersion.Parse(TestContext.Current.ToolsetUnderTest.SdkVersion);
if (new SemanticVersion(sdkVersion.Major, sdkVersion.Minor, sdkVersion.Patch) < new SemanticVersion(7, 0, 200))
return; // Fixed by https://github.com/dotnet/sdk/pull/29009

var targetFramework = "net5.0";
var testAsset = _testAssetsManager
.CopyTestAsset("AppWithLibrary", "ImplicitFrameworkConstants", targetFramework, identifier: expectedDefines.GetHashCode().ToString())
Expand Down Expand Up @@ -424,7 +431,7 @@ public void It_implicitly_defines_compilation_constants_for_the_target_platform(
});

AssertDefinedConstantsOutput(testAsset, targetFramework,
new[] { "NETCOREAPP", "NETCOREAPP1_0_OR_GREATER", "NETCOREAPP1_1_OR_GREATER", "NETCOREAPP2_0_OR_GREATER", "NETCOREAPP2_1_OR_GREATER", "NETCOREAPP2_2_OR_GREATER", "NETCOREAPP3_0_OR_GREATER", "NETCOREAPP3_1_OR_GREATER", "NET", "NET5_0", "NET5_0_OR_GREATER" }
new[] { "NETCOREAPP", "NETCOREAPP1_0_OR_GREATER", "NETCOREAPP1_1_OR_GREATER", "NETCOREAPP2_0_OR_GREATER", "NETCOREAPP2_1_OR_GREATER", "NETCOREAPP2_2_OR_GREATER", "NETCOREAPP3_0_OR_GREATER", "NETCOREAPP3_1_OR_GREATER", "NET", "NET5_0", "NET5_0_OR_GREATER" }
.Concat(expectedDefines).ToArray());
}

Expand Down Expand Up @@ -920,7 +927,7 @@ public void It_can_build_with_dynamic_loading_enabled(string targetFramework, st
testProject.AdditionalProperties["CopyLocalLockFileAssemblies"] = copyLocal.ToString().ToLower();
}

var identifier = targetFramework + shouldSetRollForward + shouldCopyLocal + (rollForwardValue == null? "Null" : rollForwardValue);
var identifier = targetFramework + shouldSetRollForward + shouldCopyLocal + (rollForwardValue == null ? "Null" : rollForwardValue);
var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: identifier);

var buildCommand = new BuildCommand(testAsset);
Expand Down Expand Up @@ -949,7 +956,7 @@ public void It_can_build_with_dynamic_loading_enabled(string targetFramework, st
string runtimeConfigFile = Path.Combine(outputDirectory.FullName, runtimeConfigName);
string runtimeConfigContents = File.ReadAllText(runtimeConfigFile);
JObject runtimeConfig = JObject.Parse(runtimeConfigContents);
JToken rollForward= runtimeConfig["runtimeOptions"]["rollForward"];
JToken rollForward = runtimeConfig["runtimeOptions"]["rollForward"];
if (shouldSetRollForward)
{
rollForward.Value<string>().Should().Be(string.IsNullOrEmpty(rollForwardValue) ? "LatestMinor" : rollForwardValue);
Expand Down Expand Up @@ -990,7 +997,7 @@ public class ProjectNameWithSpacesClass
}");
string projectFolder = Path.Combine(testAsset.Path, testProject.Name);

var buildCommand = new BuildCommand(testAsset, $"{ testProject.Name}");
var buildCommand = new BuildCommand(testAsset, $"{testProject.Name}");
buildCommand
.Execute()
.Should()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
using System.IO;
using System.Linq;
using System;
using NuGet.Versioning;

namespace Microsoft.NET.Build.Tests
{
public class GivenThatWeWantToBuildAWindowsDesktopProject : SdkTest
{
public GivenThatWeWantToBuildAWindowsDesktopProject(ITestOutputHelper log) : base(log)
{}
{ }

[WindowsOnlyRequiresMSBuildVersionTheory("16.7.0-preview-20310-07")]
[InlineData("UseWindowsForms")]
Expand Down Expand Up @@ -197,6 +198,11 @@ public void It_fails_if_windows_target_platform_version_is_invalid()
[InlineData(false)]
public void It_succeeds_if_windows_target_platform_version_does_not_have_trailing_zeros(bool setInTargetframework)
{
// Skip Test if SDK is < 7.0.200
var sdkVersion = SemanticVersion.Parse(TestContext.Current.ToolsetUnderTest.SdkVersion);
if (new SemanticVersion(sdkVersion.Major, sdkVersion.Minor, sdkVersion.Patch) < new SemanticVersion(7, 0, 200))
return; // Fixed by https://github.com/dotnet/sdk/pull/29009

var testProject = new TestProject()
{
Name = "ValidWindowsVersion",
Expand Down Expand Up @@ -403,7 +409,7 @@ public void ItUsesCorrectWindowsSdkPackVersion(string targetFramework, bool? use

var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: targetFramework + useWindowsSDKPreview + windowsSdkPackageVersion);

string referencedWindowsSdkVersion = GetReferencedWindowsSdkVersion(testAsset);
string referencedWindowsSdkVersion = GetReferencedWindowsSdkVersion(testAsset);

// The patch version of the Windows SDK Ref pack will change over time, so we use a '*' in the expected version to indicate that and replace it with
// the 4th part of the version number of the resolved package.
Expand Down
6 changes: 6 additions & 0 deletions src/Tests/Microsoft.NET.Build.Tests/WorkloadTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using Microsoft.NET.TestFramework.Assertions;
using Microsoft.NET.TestFramework.Commands;
using Microsoft.NET.TestFramework.ProjectConstruction;
using NuGet.Versioning;
using Xunit;
using Xunit.Abstractions;

Expand Down Expand Up @@ -278,6 +279,11 @@ public void It_should_get_suggested_workload_by_GetRequiredWorkloads_target()
[InlineData("net6.0", "net6.0", "macos")]
public void Given_multi_target_It_should_get_suggested_workload_by_GetRequiredWorkloads_target(string mainTfm, string referencingTfm, string expected)
{
// Skip Test if SDK is < 6.0.400
var sdkVersion = SemanticVersion.Parse(TestContext.Current.ToolsetUnderTest.SdkVersion);
if (new SemanticVersion(sdkVersion.Major, sdkVersion.Minor, sdkVersion.Patch) < new SemanticVersion(6, 0, 400))
return; // MAUI was removed from earlier versions of the SDK

var mainProject = new TestProject()
{
Name = "MainProject",
Expand Down
Loading