Merge branch 'main' into darc-main-d813792c-eeee-4e40-9f7c-567a78c653dd

This commit is contained in:
Steve Pfister 2023-08-15 17:46:54 -07:00 committed by GitHub
commit b3818b3af4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 139 additions and 73 deletions

View file

@ -106,22 +106,22 @@
<Uri>https://github.com/dotnet/test-templates</Uri>
<Sha>0385265f4d0b6413d64aea0223172366a9b9858c</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Test.ProjectTemplates.5.0" Version="1.1.0-rc.23410.2">
<Dependency Name="Microsoft.DotNet.Test.ProjectTemplates.5.0" Version="1.1.0-rc.23415.2">
<Uri>https://github.com/dotnet/test-templates</Uri>
<Sha>1e5f3603af2277910aad946736ee23283e7f3e16</Sha>
<Sha>56167d00449a4f6dbdc880f7abe7d3097b9b6df8</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Test.ProjectTemplates.6.0" Version="1.1.0-rc.23410.2">
<Dependency Name="Microsoft.DotNet.Test.ProjectTemplates.6.0" Version="1.1.0-rc.23415.2">
<Uri>https://github.com/dotnet/test-templates</Uri>
<Sha>1e5f3603af2277910aad946736ee23283e7f3e16</Sha>
<Sha>56167d00449a4f6dbdc880f7abe7d3097b9b6df8</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Test.ProjectTemplates.7.0" Version="1.1.0-rc.23410.2">
<Dependency Name="Microsoft.DotNet.Test.ProjectTemplates.7.0" Version="1.1.0-rc.23415.2">
<Uri>https://github.com/dotnet/test-templates</Uri>
<Sha>1e5f3603af2277910aad946736ee23283e7f3e16</Sha>
<Sha>56167d00449a4f6dbdc880f7abe7d3097b9b6df8</Sha>
<SourceBuild RepoName="test-templates" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DotNet.Test.ProjectTemplates.8.0" Version="1.1.0-rc.23410.2">
<Dependency Name="Microsoft.DotNet.Test.ProjectTemplates.8.0" Version="1.1.0-rc.23415.2">
<Uri>https://github.com/dotnet/test-templates</Uri>
<Sha>1e5f3603af2277910aad946736ee23283e7f3e16</Sha>
<Sha>56167d00449a4f6dbdc880f7abe7d3097b9b6df8</Sha>
</Dependency>
<!-- For coherency purposes, these versions should be gated by the versions of winforms and wpf routed via windowsdesktop -->
<Dependency Name="Microsoft.Dotnet.WinForms.ProjectTemplates" Version="8.0.0-rc.1.23411.1" CoherentParentDependency="Microsoft.WindowsDesktop.App.Runtime.win-x64">
@ -206,18 +206,18 @@
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.23411.1">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.23414.5">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>9b2af35a6702526dc8a7c5fcadcc44efd0dca170</Sha>
<Sha>d3b8861e20aaf0179034c6076d156e2442b26f9b</Sha>
<SourceBuild RepoName="arcade" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DotNet.CMake.Sdk" Version="8.0.0-beta.23411.1">
<Dependency Name="Microsoft.DotNet.CMake.Sdk" Version="8.0.0-beta.23414.5">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>9b2af35a6702526dc8a7c5fcadcc44efd0dca170</Sha>
<Sha>d3b8861e20aaf0179034c6076d156e2442b26f9b</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="8.0.0-beta.23411.1">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="8.0.0-beta.23414.5">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>9b2af35a6702526dc8a7c5fcadcc44efd0dca170</Sha>
<Sha>d3b8861e20aaf0179034c6076d156e2442b26f9b</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Darc" Version="1.1.0-beta.23374.1">
<Uri>https://github.com/dotnet/arcade-services</Uri>
@ -236,9 +236,9 @@
<Sha>45f5554ac6813e1e155c47fd80ec146c684f65e8</Sha>
<SourceBuild RepoName="source-build-reference-packages" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="1.0.0-beta.23408.1" CoherentParentDependency="Microsoft.DotNet.Arcade.Sdk">
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="1.0.0-beta.23412.1" CoherentParentDependency="Microsoft.DotNet.Arcade.Sdk">
<Uri>https://github.com/dotnet/xliff-tasks</Uri>
<Sha>493329204079519072f0241ed26f692bdee0d60c</Sha>
<Sha>676974258e23c108cd6cb6fff97f5c3b5796693b</Sha>
<SourceBuild RepoName="xliff-tasks" ManagedOnly="true" />
</Dependency>
</ToolsetDependencies>

View file

@ -39,7 +39,7 @@
</PropertyGroup>
<PropertyGroup>
<!-- Dependency from https://github.com/dotnet/arcade -->
<MicrosoftDotNetBuildTasksInstallersPackageVersion>8.0.0-beta.23411.1</MicrosoftDotNetBuildTasksInstallersPackageVersion>
<MicrosoftDotNetBuildTasksInstallersPackageVersion>8.0.0-beta.23414.5</MicrosoftDotNetBuildTasksInstallersPackageVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Dependency from https://github.com/dotnet/arcade-services -->
@ -60,10 +60,10 @@
<MicrosoftDotNetTestProjectTemplates30PackageVersion>1.0.2-beta4.22406.1</MicrosoftDotNetTestProjectTemplates30PackageVersion>
<!-- Supported versions -->
<MicrosoftDotNetTestProjectTemplates31PackageVersion>1.1.0-rc.22558.1</MicrosoftDotNetTestProjectTemplates31PackageVersion>
<MicrosoftDotNetTestProjectTemplates50PackageVersion>1.1.0-rc.23410.2</MicrosoftDotNetTestProjectTemplates50PackageVersion>
<MicrosoftDotNetTestProjectTemplates60PackageVersion>1.1.0-rc.23410.2</MicrosoftDotNetTestProjectTemplates60PackageVersion>
<MicrosoftDotNetTestProjectTemplates70PackageVersion>1.1.0-rc.23410.2</MicrosoftDotNetTestProjectTemplates70PackageVersion>
<MicrosoftDotNetTestProjectTemplates80PackageVersion>1.1.0-rc.23410.2</MicrosoftDotNetTestProjectTemplates80PackageVersion>
<MicrosoftDotNetTestProjectTemplates50PackageVersion>1.1.0-rc.23415.2</MicrosoftDotNetTestProjectTemplates50PackageVersion>
<MicrosoftDotNetTestProjectTemplates60PackageVersion>1.1.0-rc.23415.2</MicrosoftDotNetTestProjectTemplates60PackageVersion>
<MicrosoftDotNetTestProjectTemplates70PackageVersion>1.1.0-rc.23415.2</MicrosoftDotNetTestProjectTemplates70PackageVersion>
<MicrosoftDotNetTestProjectTemplates80PackageVersion>1.1.0-rc.23415.2</MicrosoftDotNetTestProjectTemplates80PackageVersion>
</PropertyGroup>
<PropertyGroup>
<!-- NUnit3.DotNetNew.Template versions do not 'flow in' -->

View file

@ -79,7 +79,6 @@ getNonPortableDistroRid()
# Input:
# os: (str)
# arch: (str)
# isPortable: (int)
# rootfsDir?: (nullable:string)
#
# Return:
@ -97,10 +96,9 @@ initDistroRidGlobal()
{
local targetOs="$1"
local targetArch="$2"
local isPortable="$3"
local rootfsDir=""
if [ "$#" -ge 4 ]; then
rootfsDir="$4"
if [ "$#" -ge 3 ]; then
rootfsDir="$3"
fi
if [ -n "${rootfsDir}" ]; then

View file

@ -0,0 +1,75 @@
<#
.SYNOPSIS
Install and run the 'Microsoft.DotNet.VersionTools.Cli' tool with the 'trim-artifacts-version' command to trim the version from the NuGet assets file name.
.PARAMETER InputPath
Full path to directory where artifact packages are stored
.PARAMETER Recursive
Search for NuGet packages recursively
#>
Param(
[string] $InputPath,
[bool] $Recursive = $true
)
$CliToolName = "Microsoft.DotNet.VersionTools.Cli"
function Install-VersionTools-Cli {
param(
[Parameter(Mandatory=$true)][string]$Version
)
Write-Host "Installing the package '$CliToolName' with a version of '$version' ..."
$feed = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json"
$argumentList = @("tool", "install", "--local", "$CliToolName", "--add-source $feed", "--no-cache", "--version $Version")
Start-Process "$dotnet" -Verbose -ArgumentList $argumentList -NoNewWindow -Wait
}
# -------------------------------------------------------------------
if (!(Test-Path $InputPath)) {
Write-Host "Input Path '$InputPath' does not exist"
ExitWithExitCode 1
}
$ErrorActionPreference = 'Stop'
Set-StrictMode -Version 2.0
$disableConfigureToolsetImport = $true
$global:LASTEXITCODE = 0
# `tools.ps1` checks $ci to perform some actions. Since the SDL
# scripts don't necessarily execute in the same agent that run the
# build.ps1/sh script this variable isn't automatically set.
$ci = $true
. $PSScriptRoot\..\tools.ps1
try {
$dotnetRoot = InitializeDotNetCli -install:$true
$dotnet = "$dotnetRoot\dotnet.exe"
$toolsetVersion = Read-ArcadeSdkVersion
Install-VersionTools-Cli -Version $toolsetVersion
$cliToolFound = (& "$dotnet" tool list --local | Where-Object {$_.Split(' ')[0] -eq $CliToolName})
if ($null -eq $cliToolFound) {
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "The '$CliToolName' tool is not installed."
ExitWithExitCode 1
}
Exec-BlockVerbosely {
& "$dotnet" $CliToolName trim-assets-version `
--assets-path $InputPath `
--recursive $Recursive
Exit-IfNZEC "Sdl"
}
}
catch {
Write-Host $_
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_
ExitWithExitCode 1
}

View file

@ -671,6 +671,10 @@ function InitializeNativeTools() {
}
}
function Read-ArcadeSdkVersion() {
return $GlobalJson.'msbuild-sdks'.'Microsoft.DotNet.Arcade.Sdk'
}
function InitializeToolset() {
if (Test-Path variable:global:_ToolsetBuildProj) {
return $global:_ToolsetBuildProj
@ -678,7 +682,7 @@ function InitializeToolset() {
$nugetCache = GetNuGetPackageCachePath
$toolsetVersion = $GlobalJson.'msbuild-sdks'.'Microsoft.DotNet.Arcade.Sdk'
$toolsetVersion = Read-ArcadeSdkVersion
$toolsetLocationFile = Join-Path $ToolsetDir "$toolsetVersion.txt"
if (Test-Path $toolsetLocationFile) {

View file

@ -11,7 +11,7 @@
"cmake": "3.21.0"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23411.1",
"Microsoft.DotNet.CMake.Sdk": "8.0.0-beta.23411.1"
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23414.5",
"Microsoft.DotNet.CMake.Sdk": "8.0.0-beta.23414.5"
}
}

View file

@ -63,4 +63,8 @@ while [[ $# > 0 ]]; do
shift
done
source $REPOROOT/eng/common/native/init-os-and-arch.sh
source $REPOROOT/eng/common/native/init-distro-rid.sh
initDistroRidGlobal "$os" "$arch" ""
. "$REPOROOT/eng/common/build.sh" --build --restore "${args[@]}"

View file

@ -158,6 +158,8 @@
</PropertyGroup>
<PropertyGroup>
<!-- Use current machine distro RID if set. Otherwise, fall back to RuntimeInformation.RuntimeIdentifier -->
<TargetRid Condition="'$(TargetRid)' == ''">$(__DistroRid)</TargetRid>
<TargetRid Condition="'$(TargetRid)' == ''">$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)</TargetRid>
<TargetOS Condition="'$(TargetOS)' == '' AND $([MSBuild]::IsOSPlatform('WINDOWS'))">Windows_NT</TargetOS>
@ -165,10 +167,11 @@
<TargetOS Condition="'$(TargetOS)' == '' AND $([MSBuild]::IsOSPlatform('LINUX'))">Linux</TargetOS>
<TargetOS Condition="'$(TargetOS)' == '' AND $([MSBuild]::IsOSPlatform('FREEBSD'))">FreeBSD</TargetOS>
<PortableRid Condition="'$(TargetOS)' == 'FreeBSD'">freebsd-$(Platform)</PortableRid>
<PortableRid Condition="'$(TargetOS)' == 'OSX'">osx-$(Platform)</PortableRid>
<PortableRid Condition="'$(TargetOS)' == 'Linux'">linux-$(Platform)</PortableRid>
<PortableRid Condition="'$(TargetOS)' == 'Windows_NT'">win-$(Platform)</PortableRid>
<PortableRid Condition="'$(__PortableTargetOS)' != ''">$(__PortableTargetOS)-$(Platform)</PortableRid>
<PortableRid Condition="'$(PortableRid)' == '' AND '$(TargetOS)' == 'FreeBSD'">freebsd-$(Platform)</PortableRid>
<PortableRid Condition="'$(PortableRid)' == '' AND '$(TargetOS)' == 'OSX'">osx-$(Platform)</PortableRid>
<PortableRid Condition="'$(PortableRid)' == '' AND '$(TargetOS)' == 'Linux'">linux-$(Platform)</PortableRid>
<PortableRid Condition="'$(PortableRid)' == '' AND '$(TargetOS)' == 'Windows_NT'">win-$(Platform)</PortableRid>
<TargetRid Condition="'$(PortableBuild)' == 'true' AND '$(PortableRid)' != ''">$(PortableRid)</TargetRid>
</PropertyGroup>

View file

@ -34,6 +34,22 @@
<RemoveDir Directories="$(BaseOutputPath)" />
</Target>
<!-- Copies the output assets of the builds to the output path. -->
<Target Name="CopyBinariesToBinFolder"
AfterTargets="Build"
Inputs="$(MSBuildProjectFullPath)"
Outputs="$(CompletedSemaphorePath)CopyBinariesToBinFolder.complete">
<ItemGroup>
<BinariesToCopy Include="$(SourceBuiltAssetsDir)*.*" Exclude="$(SourceBuiltAssetsDir)*.nupkg;$(SourceBuiltAssetsDir)*.requires_nupkg_signing" />
</ItemGroup>
<Copy SourceFiles="@(BinariesToCopy)"
DestinationFolder="$(OutputPath)"
Condition="'@(BinariesToCopy)'!=''" />
<WriteLinesToFile File="$(CompletedSemaphorePath)CopyBinariesToBinFolder.complete" Overwrite="true" />
</Target>
<!-- After building, generate a prebuilt usage report. -->
<Target Name="ReportPrebuiltUsage"
AfterTargets="Build"

View file

@ -247,6 +247,10 @@ echo "Found bootstrap SDK $SDK_VERSION, bootstrap Arcade $ARCADE_BOOTSTRAP_VERSI
export DOTNET_CLI_TELEMETRY_OPTOUT=1
export NUGET_PACKAGES=$packagesRestoredDir/
source $SCRIPT_ROOT/eng/common/native/init-os-and-arch.sh
source $SCRIPT_ROOT/eng/common/native/init-distro-rid.sh
initDistroRidGlobal "$os" "$arch" ""
LogDateStamp=$(date +"%m%d%H%M%S")
"$CLI_ROOT/dotnet" build-server shutdown

View file

@ -82,26 +82,5 @@
<EnvironmentVariables Include="CLIBUILD_SKIP_BUNDLEDDOTNETTOOLS=true" />
</ItemGroup>
<Target Name="CopyTarBall"
AfterTargets="ExtractIntermediatePackages"
Inputs="$(MSBuildProjectFullPath)"
Outputs="$(RepoCompletedSemaphorePath)CopyTarBall.complete">
<PropertyGroup>
<TarBallPath>$(SourceBuiltAssetsDir)dotnet-sdk-*$(TarBallExtension)</TarBallPath>
</PropertyGroup>
<ItemGroup>
<TarBall Include="$(TarBallPath)" />
</ItemGroup>
<Error Condition="'@(TarBall)' == ''" Text="'$(TarBallPath)' does not exist." />
<Copy SourceFiles="@(TarBall)"
DestinationFolder="$(SourceBuiltTarBallPath)" />
<WriteLinesToFile File="$(RepoCompletedSemaphorePath)CopyTarBall.complete" Overwrite="true" />
</Target>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>

View file

@ -78,25 +78,5 @@
Rid="$(TargetRid)-$(Platform)" />
</Target>
<Target Name="CopyBinariesToBinFolder"
AfterTargets="ExtractIntermediatePackages"
Inputs="$(MSBuildProjectFullPath)"
Outputs="$(RepoCompletedSemaphorePath)CopyBinariesToBinFolder.complete">
<ItemGroup>
<_builtRuntimePackages Include="$(SourceBuiltAssetsDir)*.symbols.nupkg" />
<_builtRuntimePackages>
<TransformedFileName>$([System.String]::Copy('%(FileName)').Replace('symbols', 'nupkg'))</TransformedFileName>
</_builtRuntimePackages>
<BinariesToCopy Include="$(SourceBuiltAssetsDir)*.*" Exclude="$(SourceBuiltAssetsDir)*.nupkg;$(SourceBuiltAssetsDir)*.requires_nupkg_signing" />
<BinariesToCopy Include="@(_builtRuntimePackages->'$(SourceBuiltPackagesPath)%(TransformedFileName)')" />
</ItemGroup>
<Copy SourceFiles="@(BinariesToCopy)"
DestinationFolder="$(OutputPath)runtime"
Condition="'@(BinariesToCopy)'!=''" />
<WriteLinesToFile File="$(RepoCompletedSemaphorePath)CopyBinariesToBinFolder.complete" Overwrite="true" />
</Target>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>

View file

@ -20,6 +20,7 @@
**/TestCert*.pfx
**/tests/*
eng/common/loc/*.lss # UTF16-LE text files
**/eng/common/loc/*.lss # UTF16-LE text files
src/aspnetcore/**/samples/*

View file

@ -1,6 +1,8 @@
<Project>
<Target Name="GetCurrentRuntimeInformation">
<PropertyGroup>
<!-- Use current machine distro RID if set. Otherwise, fall back to RuntimeInformation.RuntimeIdentifier -->
<HostRid Condition="'$(HostRid)' == '' and '$(MSBuildRuntimeType)' == 'core'">$(__DistroRid)</HostRid>
<HostRid Condition="'$(HostRid)' == '' and '$(MSBuildRuntimeType)' == 'core'">$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)</HostRid>
<HostRid Condition="'$(HostRid)' == '' and '$(MSBuildRuntimeType)' != 'core'">win-$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLowerInvariant)</HostRid>