Merged PR 653351: Enable .net6 by default

This commit is contained in:
Semih Okur 2022-03-17 15:42:38 +00:00
Родитель 751b5ed212
Коммит 551664adb5
14 изменённых файлов: 77 добавлений и 115 удалений

Просмотреть файл

@ -4,4 +4,4 @@
import {createPublicDotNetRuntime} from "DotNet-Runtime.Common";
@@public
export const extracted = createPublicDotNetRuntime(importFrom("DotNet-Runtime.linux-x64.6.0.101").extracted, undefined);
export const extracted = createPublicDotNetRuntime(importFrom("DotNet-Runtime.linux-x64.6.0.201").extracted, undefined);

Просмотреть файл

@ -4,4 +4,4 @@
import {createPublicDotNetRuntime} from "DotNet-Runtime.Common";
@@public
export const extracted = createPublicDotNetRuntime(importFrom("DotNet-Runtime.osx-x64.6.0.101").extracted, undefined);
export const extracted = createPublicDotNetRuntime(importFrom("DotNet-Runtime.osx-x64.6.0.201").extracted, undefined);

Просмотреть файл

@ -7,4 +7,4 @@ const isWinOs = Context.getCurrentHost().os === "win";
@@public
export const extracted = createPublicDotNetRuntime(
isWinOs ? <StaticDirectory>importFrom("DotNet-Runtime.win-x64.6.0.101").extracted : undefined, undefined);
isWinOs ? <StaticDirectory>importFrom("DotNet-Runtime.win-x64.6.0.201").extracted : undefined, undefined);

Просмотреть файл

@ -9,7 +9,8 @@ import * as Nuget from "Sdk.Managed.Tools.NuGet";
namespace NugetPackages {
export declare const qualifier : { configuration: "debug" | "release" };
const defaultTargetFramework = "net6.0";
const net472PackageQualifer = {
targetFramework: "net472",
targetRuntime: "win-x64"
@ -68,7 +69,7 @@ namespace NugetPackages {
const winX64 = !canBuildAllPackagesOnThisHost ? undefined : pack({
id: `${packageNamePrefix}.win-x64`,
deployment: BuildXL.withQualifier({
targetFramework: "netcoreapp3.1",
targetFramework: defaultTargetFramework,
targetRuntime: "win-x64"
}).deployment,
deploymentOptions: reducedDeploymentOptions
@ -77,7 +78,7 @@ namespace NugetPackages {
const osxX64 = pack({
id: `${packageNamePrefix}.osx-x64`,
deployment: BuildXL.withQualifier({
targetFramework: "netcoreapp3.1",
targetFramework: defaultTargetFramework,
targetRuntime: "osx-x64"
}).deployment,
deploymentOptions: reducedDeploymentOptions
@ -86,34 +87,7 @@ namespace NugetPackages {
const linuxX64 = pack({
id: `${packageNamePrefix}.linux-x64`,
deployment: BuildXL.withQualifier({
targetFramework: "netcoreapp3.1",
targetRuntime: "linux-x64"
}).deployment,
deploymentOptions: reducedDeploymentOptions
});
const winX64Net6 = !canBuildAllPackagesOnThisHost ? undefined : pack({
id: `${packageNamePrefix}.win-x64-net6`,
deployment: BuildXL.withQualifier({
targetFramework: "net6.0",
targetRuntime: "win-x64"
}).deployment,
deploymentOptions: reducedDeploymentOptions
});
const osxX64Net6 = pack({
id: `${packageNamePrefix}.osx-x64-net6`,
deployment: BuildXL.withQualifier({
targetFramework: "net6.0",
targetRuntime: "osx-x64"
}).deployment,
deploymentOptions: reducedDeploymentOptions
});
const linuxX64Net6 = pack({
id: `${packageNamePrefix}.linux-x64-net6`,
deployment: BuildXL.withQualifier({
targetFramework: "net6.0",
targetFramework: defaultTargetFramework,
targetRuntime: "linux-x64"
}).deployment,
deploymentOptions: reducedDeploymentOptions
@ -439,7 +413,7 @@ namespace NugetPackages {
const toolsSandBoxExec = pack({
id: `${packageNamePrefix}.Tools.SandboxExec.osx-x64`,
deployment: Tools.SandboxExec.withQualifier({
targetFramework: "netcoreapp3.1",
targetFramework: defaultTargetFramework,
targetRuntime: "osx-x64"
}).deployment
});
@ -448,25 +422,7 @@ namespace NugetPackages {
const toolsOrchestrator = pack({
id: `${packageNamePrefix}.Tools.Orchestrator.osx-x64`,
deployment: Tools.Orchestrator.withQualifier({
targetFramework: "netcoreapp3.1",
targetRuntime: "osx-x64"
}).deployment
});
// Currently we deploy tools as self-contained .NET Core binaries for macOS only!
const toolsSandBoxExecNet6 = pack({
id: `${packageNamePrefix}.Tools.SandboxExec.osx-x64-net6`,
deployment: Tools.SandboxExec.withQualifier({
targetFramework: "net6.0",
targetRuntime: "osx-x64"
}).deployment
});
// Currently we deploy tools as self-contained .NET Core binaries for macOS only!
const toolsOrchestratorNet6 = pack({
id: `${packageNamePrefix}.Tools.Orchestrator.osx-x64-net6`,
deployment: Tools.Orchestrator.withQualifier({
targetFramework: "net6.0",
targetFramework: defaultTargetFramework,
targetRuntime: "osx-x64"
}).deployment
});
@ -475,7 +431,7 @@ namespace NugetPackages {
contents: [
...addIfLazy(canBuildAllPackagesOnThisHost, () => [
...addIf(!BuildXLSdk.Flags.genVSSolution,
winX64, winX64Net6
winX64
),
cacheTools,
cacheLibraries,
@ -488,9 +444,8 @@ namespace NugetPackages {
engineCache
]),
sdks,
...addIf(!BuildXLSdk.Flags.genVSSolution, osxX64, osxX64Net6, linuxX64, linuxX64Net6, toolsOrchestrator, toolsOrchestratorNet6),
toolsSandBoxExec,
toolsSandBoxExecNet6
...addIf(!BuildXLSdk.Flags.genVSSolution, osxX64, linuxX64, toolsOrchestrator),
toolsSandBoxExec
]
};

Просмотреть файл

@ -7,7 +7,7 @@ import * as BuildXLSdk from "Sdk.BuildXL";
namespace Tests.Linux {
export declare const qualifier :
{configuration: "debug" | "release", targetFramework: "netcoreapp3.1", targetRuntime: "linux-x64"};
{configuration: "debug" | "release", targetFramework: "net6.0", targetRuntime: "linux-x64"};
const sharedBinFolderName = a`shared_bin`;

Просмотреть файл

@ -58,8 +58,8 @@ namespace BuildXL {
@@public
export const deployed = BuildXLSdk.DeploymentHelpers.deploy({
definition: deployment,
targetLocation: (qualifier.targetFramework === "net5.0" || qualifier.targetFramework === "net6.0") // Keeping the old layout as-is and making change for .net5 and .net6 only
? r`${qualifier.configuration}/${qualifier.targetFramework}/${qualifier.targetRuntime}`
: r`${qualifier.configuration}/${qualifier.targetRuntime}`,
targetLocation: (qualifier.targetFramework === "net6.0") // If targetFramework is not a default one (net6.0), then we put it in a separate directory.
? r`${qualifier.configuration}/${qualifier.targetRuntime}`
: r`${qualifier.configuration}/${qualifier.targetFramework}/${qualifier.targetRuntime}`,
});
}

Просмотреть файл

@ -112,9 +112,9 @@ namespace Tools {
const deployed = BuildXLSdk.DeploymentHelpers.deploy({
definition: deployment,
targetLocation: (qualifier.targetFramework === "net5.0" || qualifier.targetFramework === "net6.0")
? r`${qualifier.targetFramework}/${qualifier.configuration}/tools/DistributedBuildRunner/${qualifier.targetRuntime}`
: r`${qualifier.configuration}/tools/DistributedBuildRunner/${frameworkSpecificPart}`
targetLocation: (qualifier.targetFramework === "net6.0")
? r`${qualifier.configuration}/tools/DistributedBuildRunner/${frameworkSpecificPart}`
: r`${qualifier.targetFramework}/${qualifier.configuration}/tools/DistributedBuildRunner/${qualifier.targetRuntime}`
});
}
}

Просмотреть файл

@ -1053,7 +1053,10 @@ namespace Test.BuildXL.Storage
using (var stream = FileUtilities.CreateFileStream(file, FileMode.Open, FileAccess.Read, FileShare.Read | FileShare.Delete))
{
FileSystemType fsType = FileUtilities.GetVolumeFileSystemByHandle(stream.SafeFileHandle);
XAssert.AreNotEqual(FileSystemType.Unknown, fsType);
if (!OperatingSystemHelper.IsLinuxOS)
{
XAssert.AreNotEqual(FileSystemType.Unknown, fsType);
}
}
}

Просмотреть файл

@ -1,3 +1,3 @@
set BUILDXL_LKG_NAME=BuildXL.win-x64-net6
set BUILDXL_LKG_NAME=BuildXL.win-x64
set BUILDXL_LKG_VERSION=0.1.0-20220311.6
set BUILDXL_LKG_FEED_1=https://pkgs.dev.azure.com/1essharedassets/_packaging/BuildXL/nuget/v3/index.json

Просмотреть файл

@ -1,3 +1,3 @@
set BUILDXL_LKG_NAME=Microsoft.BuildXL.win-x64-net6
set BUILDXL_LKG_NAME=Microsoft.BuildXL.win-x64
set BUILDXL_LKG_VERSION=0.1.0-20220311.6
set BUILDXL_LKG_FEED_1=https://pkgs.dev.azure.com/ms/BuildXL/_packaging/BuildXL/nuget/v3/index.json

Просмотреть файл

@ -72,7 +72,7 @@ param(
[ValidateSet("Release", "Debug")]
[string]$DeployConfig = "Debug", # must match defaultQualifier.configuration in config.dsc
[ValidateSet("net472", "net5.0", "net6.0", "win-x64", "osx-x64")]
[ValidateSet("net472", "netcoreapp3.1", "net5.0", "win-x64", "osx-x64")]
[string]$DeployRuntime = "win-x64", # must correspond to defaultQualifier.targetFramework in config.dsc
[Parameter(Mandatory=$false)]
@ -296,7 +296,7 @@ if ($Vs -or $VsAll) {
$AdditionalBuildXLArguments += "/q:Debug /q:DebugNet472";
} else {
# by default (-vs) we build only .NET Core and only projects targeting one of the .NET Core frameworks
$AdditionalBuildXLArguments += "/q:Debug /vsTargetFramework:netcoreapp3.0 /vsTargetFramework:netcoreapp3.1 /vsTargetFramework:netstandard2.0 /vsTargetFramework:netstandard2.1";
$AdditionalBuildXLArguments += "/q:Debug /vsTargetFramework:netcoreapp3.0 /vsTargetFramework:netcoreapp3.1 /vsTargetFramework:netstandard2.0 /vsTargetFramework:netstandard2.1 /vsTargetFramework:net6.0";
}
}
@ -371,14 +371,13 @@ function New-Deployment {
}
$buildRelativeDir = [io.path]::combine($DeploymentRoot, $DeployConfig, $DeployRuntime)
if ($DeployRuntime -eq "net5.0" -or $DeployRuntime -eq "net6.0") {
if ($DeployRuntime -ne "win-x64") {
# Handling .net 5 differently, because the old scheme is not suitable for having dev deployments with different qualifiers.
$framework = $DeployRuntime;
$DeployRuntime = "win-x64";
$buildRelativeDir = [io.path]::combine($DeploymentRoot, $DeployConfig, $framework, $DeployRuntime)
}
return @{
description = $Description;
dir = $dir;
@ -585,15 +584,18 @@ if ($DeployConfig -eq "Release") {
if ($DeployRuntime -eq "net472") {
$AdditionalBuildXLArguments += "/q:ReleaseNet472"
}
elseif ($DeployRuntime -eq "netcoreapp3.1") {
$AdditionalBuildXLArguments += "/q:ReleaseDotNetCore"
}
elseif ($DeployRuntime -eq "net5.0") {
$AdditionalBuildXLArguments += "/q:ReleaseDotNet5"
}
elseif ($DeployRuntime -eq "net6.0") {
$AdditionalBuildXLArguments += "/q:ReleaseDotNet6"
}
elseif ($DeployRuntime -eq "osx-x64") {
$AdditionalBuildXLArguments += "/q:ReleaseDotNetCoreMac"
}
elseif ($DeployRuntime -eq "linux-x64") {
$AdditionalBuildXLArguments += "/q:ReleaseLinux"
}
else {
$AdditionalBuildXLArguments += "/q:Release"
}
@ -601,15 +603,18 @@ if ($DeployConfig -eq "Release") {
if ($DeployRuntime -eq "net472") {
$AdditionalBuildXLArguments += "/q:DebugNet472"
}
elseif ($DeployRuntime -eq "netcoreapp3.1") {
$AdditionalBuildXLArguments += "/q:ReleaseDotNetCore"
}
elseif ($DeployRuntime -eq "net5.0") {
$AdditionalBuildXLArguments += "/q:DebugDotNet5"
}
elseif ($DeployRuntime -eq "net6.0") {
$AdditionalBuildXLArguments += "/q:DebugDotNet6"
}
elseif ($DeployRuntime -eq "osx-x64") {
$AdditionalBuildXLArguments += "/q:DebugDotNetCoreMac"
}
elseif ($DeployRuntime -eq "linux-x64") {
$AdditionalBuildXLArguments += "/q:DebugLinux"
}
}
$useDeployment = Get-Deployment $use;

Просмотреть файл

@ -1644,7 +1644,7 @@
"Type": "NuGet",
"NuGet": {
"Name": "Microsoft.NETCore.App.Host.linux-x64",
"Version": "6.0.1"
"Version": "6.0.2"
}
}
},
@ -1671,7 +1671,7 @@
"Type": "NuGet",
"NuGet": {
"Name": "Microsoft.NETCore.App.Host.osx-x64",
"Version": "6.0.1"
"Version": "6.0.2"
}
}
},
@ -1698,7 +1698,7 @@
"Type": "NuGet",
"NuGet": {
"Name": "Microsoft.NETCore.App.Host.win-x64",
"Version": "6.0.1"
"Version": "6.0.2"
}
}
},
@ -1725,7 +1725,7 @@
"Type": "NuGet",
"NuGet": {
"Name": "Microsoft.NETCore.App.Ref",
"Version": "6.0.1"
"Version": "6.0.2"
}
}
},
@ -1752,7 +1752,7 @@
"Type": "NuGet",
"NuGet": {
"Name": "Microsoft.NETCore.App.Runtime.linux-x64",
"Version": "6.0.1"
"Version": "6.0.2"
}
}
},
@ -1779,7 +1779,7 @@
"Type": "NuGet",
"NuGet": {
"Name": "Microsoft.NETCore.App.Runtime.osx-x64",
"Version": "6.0.1"
"Version": "6.0.2"
}
}
},
@ -1806,7 +1806,7 @@
"Type": "NuGet",
"NuGet": {
"Name": "Microsoft.NETCore.App.Runtime.win-x64",
"Version": "6.0.1"
"Version": "6.0.2"
}
}
},
@ -1842,7 +1842,7 @@
"Type": "NuGet",
"NuGet": {
"Name": "Microsoft.NETCore.DotNetAppHost",
"Version": "6.0.1"
"Version": "6.0.2"
}
}
},
@ -1869,7 +1869,7 @@
"Type": "NuGet",
"NuGet": {
"Name": "Microsoft.NETCore.DotNetHostPolicy",
"Version": "6.0.1"
"Version": "6.0.2"
}
}
},
@ -1896,7 +1896,7 @@
"Type": "NuGet",
"NuGet": {
"Name": "Microsoft.NETCore.DotNetHostResolver",
"Version": "6.0.1"
"Version": "6.0.2"
}
}
},
@ -1923,7 +1923,7 @@
"Type": "NuGet",
"NuGet": {
"Name": "Microsoft.NETCore.Platforms",
"Version": "6.0.1"
"Version": "6.0.2"
}
}
},
@ -4668,7 +4668,7 @@
"Type": "NuGet",
"NuGet": {
"Name": "runtime.linux-x64.Microsoft.NETCore.DotNetHostPolicy",
"Version": "6.0.1"
"Version": "6.0.2"
}
}
},
@ -4695,7 +4695,7 @@
"Type": "NuGet",
"NuGet": {
"Name": "runtime.linux-x64.Microsoft.NETCore.DotNetHostResolver",
"Version": "6.0.1"
"Version": "6.0.2"
}
}
},
@ -4812,7 +4812,7 @@
"Type": "NuGet",
"NuGet": {
"Name": "runtime.osx-x64.Microsoft.NETCore.DotNetHostPolicy",
"Version": "6.0.1"
"Version": "6.0.2"
}
}
},
@ -4839,7 +4839,7 @@
"Type": "NuGet",
"NuGet": {
"Name": "runtime.osx-x64.Microsoft.NETCore.DotNetHostResolver",
"Version": "6.0.1"
"Version": "6.0.2"
}
}
},
@ -4920,7 +4920,7 @@
"Type": "NuGet",
"NuGet": {
"Name": "runtime.win-x64.Microsoft.NETCore.DotNetHostPolicy",
"Version": "6.0.1"
"Version": "6.0.2"
}
}
},
@ -4947,7 +4947,7 @@
"Type": "NuGet",
"NuGet": {
"Name": "runtime.win-x64.Microsoft.NETCore.DotNetHostResolver",
"Version": "6.0.1"
"Version": "6.0.2"
}
}
},

Просмотреть файл

@ -468,23 +468,23 @@ config({
archiveType: "tgz",
},
// DotNet Core Runtime 6.0.1
// DotNet Core Runtime 6.0.3
{
moduleName: "DotNet-Runtime.win-x64.6.0.101",
url: "https://download.visualstudio.microsoft.com/download/pr/9347a0de-bc9f-455d-8224-2fdcdd4e92fe/83d5eeca56ad51922e47e8bd3880f738/dotnet-runtime-6.0.1-win-x64.zip",
hash: "VSO0:48F06E9B0D7C1D61F907FC93EBC8526FCB98438E39D696F908371C985D18777800",
moduleName: "DotNet-Runtime.win-x64.6.0.201",
url: "https://download.visualstudio.microsoft.com/download/pr/cf4207e9-1af7-4eec-8f3b-78880cae7500/1a1bd8eea1a0fb4287b3527bdfa4f757/dotnet-runtime-6.0.3-win-x64.zip",
hash: "VSO0:F270ACEE84A4BE9A229AECC0A5B8D09C0BF01684674B3066516CF2FA58EEF4A100",
archiveType: "zip",
},
{
moduleName: "DotNet-Runtime.osx-x64.6.0.101",
url: "https://download.visualstudio.microsoft.com/download/pr/56ae949c-f246-44e3-bdb3-a89847123ed2/d35135999651b78c0ef42b0e19cf06c0/dotnet-runtime-6.0.1-osx-x64.tar.gz",
hash: "VSO0:D00F26BB5137289D1C0C3D93334F53D1DD2CFB4CD2CC2229C6CFA8BC75823B1E00",
moduleName: "DotNet-Runtime.osx-x64.6.0.201",
url: "https://download.visualstudio.microsoft.com/download/pr/1f354e35-ff3f-4de7-b6be-f5001b7c3976/b7c8814ab28a6f00f063440e63903105/dotnet-runtime-6.0.3-osx-x64.tar.gz",
hash: "VSO0:F934E2046E396EBFD83F21AA4E3B7EDB42AC307EB71F423D2D57945DE52D7F5B00",
archiveType: "tgz",
},
{
moduleName: "DotNet-Runtime.linux-x64.6.0.101",
url: "https://download.visualstudio.microsoft.com/download/pr/be8a513c-f3bb-4fbd-b382-6596cf0d67b5/968e205c44eabd205b8ea98be250b880/dotnet-runtime-6.0.1-linux-x64.tar.gz",
hash: "VSO0:966B38724A2EF4A32A9784D6E52103AF96233B9E45B66865CE62E9602E36221300",
moduleName: "DotNet-Runtime.linux-x64.6.0.201",
url: "https://download.visualstudio.microsoft.com/download/pr/4e766615-57e6-4b1d-a574-25eeb7a71107/9f95f74c33711e085302ffd644ef86ee/dotnet-runtime-6.0.3-linux-x64.tar.gz",
hash: "VSO0:A3426598ACFE162FB39F2D508DF43F23B4169BD3DA26A69535DA11CAB387641F00",
archiveType: "tgz",
},
@ -562,8 +562,7 @@ config({
qualifiers: {
defaultQualifier: {
configuration: "debug",
// Once the migration to net6 is done the next line needs to be changed to net5.0
targetFramework: "netcoreapp3.1",
targetFramework: "net6.0",
targetRuntime:
Context.getCurrentHost().os === "win" ? "win-x64" :
Context.getCurrentHost().os === "macOS" ? "osx-x64" : "linux-x64",
@ -571,7 +570,7 @@ config({
namedQualifiers: {
Debug: {
configuration: "debug",
targetFramework: "netcoreapp3.1",
targetFramework: "net6.0",
targetRuntime: "win-x64",
},
DebugNet472: {
@ -596,18 +595,18 @@ config({
},
DebugDotNetCoreMac: {
configuration: "debug",
targetFramework: "netcoreapp3.1",
targetFramework: "net6.0",
targetRuntime: "osx-x64",
},
DebugLinux: {
configuration: "debug",
targetFramework: "netcoreapp3.1",
targetFramework: "net6.0",
targetRuntime: "linux-x64",
},
// Release
Release: {
configuration: "release",
targetFramework: "netcoreapp3.1",
targetFramework: "net6.0",
targetRuntime: "win-x64",
},
ReleaseNet472: {
@ -633,12 +632,12 @@ config({
},
ReleaseDotNetCoreMac: {
configuration: "release",
targetFramework: "netcoreapp3.1",
targetFramework: "net6.0",
targetRuntime: "osx-x64",
},
ReleaseLinux: {
configuration: "release",
targetFramework: "netcoreapp3.1",
targetFramework: "net6.0",
targetRuntime: "linux-x64",
},
}

Просмотреть файл

@ -3,7 +3,7 @@
const coreVersion = "3.1.0";
const core50Version = "5.0.0";
const core60Version = "6.0.1";
const core60Version = "6.0.2";
const pkgVersion = "4.3.0";
const pkgVersionNext = "4.7.0";