Skip to content
Open
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 eng/Version.Details.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This file should be imported by eng/Versions.props
<Project>
<PropertyGroup>
<!-- dotnet-dotnet dependencies -->
<MicrosoftDotNetArcadeSdkPackageVersion>11.0.0-beta.26179.102</MicrosoftDotNetArcadeSdkPackageVersion>
<MicrosoftDotNetArcadeSdkPackageVersion>11.0.0-beta.26210.111</MicrosoftDotNetArcadeSdkPackageVersion>
</PropertyGroup>
<!--Property group for alternate package version names-->
<PropertyGroup>
Expand Down
6 changes: 3 additions & 3 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Dependencies>
<Source Uri="https://github.com/dotnet/dotnet" Mapping="symreader" Sha="d70206844a95b337601237466bfc6cbb7d52d6d4" BarId="308297" />
<Source Uri="https://github.com/dotnet/dotnet" Mapping="symreader" Sha="5bed4499b04cbbaec57ac4209ae993acca3648cc" BarId="309919" />
<ProductDependencies>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="11.0.0-beta.26179.102">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="11.0.0-beta.26210.111">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>d70206844a95b337601237466bfc6cbb7d52d6d4</Sha>
<Sha>5bed4499b04cbbaec57ac4209ae993acca3648cc</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<PropertyGroup>
<VersionPrefix>3.0.0</VersionPrefix>
<PreReleaseVersionLabel>preview</PreReleaseVersionLabel>
<PreReleaseVersionIteration>3</PreReleaseVersionIteration>
<PreReleaseVersionIteration>4</PreReleaseVersionIteration>
<!-- Allowed values: '', 'prerelease', 'release'. Set to 'release' when stabilizing. -->
<DotNetFinalVersionKind></DotNetFinalVersionKind>

Expand Down
4 changes: 2 additions & 2 deletions eng/common/core-templates/job/onelocbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ jobs:
# We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com)
${{ if eq(variables['System.TeamProject'], 'DevDiv') }}:
name: AzurePipelines-EO
image: 1ESPT-Windows2022
image: 1ESPT-Windows2025
demands: Cmd
os: windows
# If it's not devdiv, it's dnceng
${{ if ne(variables['System.TeamProject'], 'DevDiv') }}:
name: $(DncEngInternalBuildPool)
image: 1es-windows-2022
image: windows.vs2026.amd64
os: windows

steps:
Expand Down
4 changes: 2 additions & 2 deletions eng/common/core-templates/job/publish-build-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ jobs:
# We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com)
${{ if eq(variables['System.TeamProject'], 'DevDiv') }}:
name: AzurePipelines-EO
image: 1ESPT-Windows2022
image: 1ESPT-Windows2025
demands: Cmd
os: windows
# If it's not devdiv, it's dnceng
${{ if ne(variables['System.TeamProject'], 'DevDiv') }}:
name: NetCore1ESPool-Publishing-Internal
image: windows.vs2022.amd64
image: windows.vs2026.amd64
os: windows
steps:
- ${{ if eq(parameters.is1ESPipeline, '') }}:
Expand Down
16 changes: 8 additions & 8 deletions eng/common/core-templates/post-build/post-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ stages:
# We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com)
${{ if eq(variables['System.TeamProject'], 'DevDiv') }}:
name: AzurePipelines-EO
image: 1ESPT-Windows2022
image: 1ESPT-Windows2025
demands: Cmd
os: windows
# If it's not devdiv, it's dnceng
Expand Down Expand Up @@ -154,14 +154,14 @@ stages:
# We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com)
${{ if eq(variables['System.TeamProject'], 'DevDiv') }}:
name: AzurePipelines-EO
image: 1ESPT-Windows2022
image: 1ESPT-Windows2025
demands: Cmd
os: windows
# If it's not devdiv, it's dnceng
${{ else }}:
${{ if eq(parameters.is1ESPipeline, true) }}:
name: $(DncEngInternalBuildPool)
image: 1es-windows-2022
image: windows.vs2026.amd64
os: windows
${{ else }}:
name: $(DncEngInternalBuildPool)
Expand Down Expand Up @@ -215,14 +215,14 @@ stages:
# We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com)
${{ if eq(variables['System.TeamProject'], 'DevDiv') }}:
name: AzurePipelines-EO
image: 1ESPT-Windows2022
image: 1ESPT-Windows2025
demands: Cmd
os: windows
# If it's not devdiv, it's dnceng
${{ else }}:
${{ if eq(parameters.is1ESPipeline, true) }}:
name: $(DncEngInternalBuildPool)
image: 1es-windows-2022
image: windows.vs2026.amd64
os: windows
${{ else }}:
name: $(DncEngInternalBuildPool)
Expand Down Expand Up @@ -276,18 +276,18 @@ stages:
# We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com)
${{ if eq(variables['System.TeamProject'], 'DevDiv') }}:
name: AzurePipelines-EO
image: 1ESPT-Windows2022
image: 1ESPT-Windows2025
demands: Cmd
os: windows
# If it's not devdiv, it's dnceng
${{ else }}:
${{ if eq(parameters.is1ESPipeline, true) }}:
name: NetCore1ESPool-Publishing-Internal
image: windows.vs2022.amd64
image: windows.vs2026.amd64
os: windows
${{ else }}:
name: NetCore1ESPool-Publishing-Internal
demands: ImageOverride -equals windows.vs2022.amd64
demands: ImageOverride -equals windows.vs2026.amd64
steps:
- template: /eng/common/core-templates/post-build/setup-maestro-vars.yml
parameters:
Expand Down
2 changes: 1 addition & 1 deletion eng/common/core-templates/stages/renovate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ parameters:
type: object
default:
name: NetCore1ESPool-Internal
image: 1es-windows-2022
image: windows.vs2026.amd64
os: windows

resources:
Expand Down
2 changes: 1 addition & 1 deletion eng/common/sdk-task.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ $warnAsError = if ($noWarnAsError) { $false } else { $true }

function Print-Usage() {
Write-Host "Common settings:"
Write-Host " -task <value> Name of Arcade task (name of a project in SdkTasks directory of the Arcade SDK package)"
Write-Host " -task <value> Name of Arcade task (name of a project in toolset directory of the Arcade SDK package)"
Write-Host " -restore Restore dependencies"
Write-Host " -verbosity <value> Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]"
Write-Host " -help Print help and exit"
Expand Down
2 changes: 1 addition & 1 deletion eng/common/sdk-task.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

show_usage() {
echo "Common settings:"
echo " --task <value> Name of Arcade task (name of a project in SdkTasks directory of the Arcade SDK package)"
echo " --task <value> Name of Arcade task (name of a project in toolset directory of the Arcade SDK package)"
echo " --restore Restore dependencies"
echo " --verbosity <value> Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]"
echo " --help Print help and exit"
Expand Down
7 changes: 3 additions & 4 deletions eng/common/templates-official/job/job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,10 @@ jobs:
sbomEnabled: false # we don't need SBOM for logs

- ${{ if eq(parameters.enablePublishBuildArtifacts, true) }}:
- output: buildArtifacts
- output: pipelineArtifact
displayName: Publish Logs
PathtoPublish: '$(Build.ArtifactStagingDirectory)/artifacts/log/$(_BuildConfig)'
publishLocation: Container
ArtifactName: ${{ coalesce(parameters.enablePublishBuildArtifacts.artifactName, '$(Agent.Os)_$(Agent.JobName)_Attempt$(System.JobAttempt)' ) }}
targetPath: '$(Build.ArtifactStagingDirectory)/artifacts/log/$(_BuildConfig)'
artifactName: ${{ coalesce(parameters.enablePublishBuildArtifacts.artifactName, '$(Agent.Os)_$(Agent.JobName)_Attempt$(System.JobAttempt)' ) }}
continueOnError: true
condition: always()
sbomEnabled: false # we don't need SBOM for logs
Expand Down
2 changes: 1 addition & 1 deletion eng/common/templates-official/variables/pool-providers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#
# pool:
# name: $(DncEngInternalBuildPool)
# image: 1es-windows-2022
# image: windows.vs2026.amd64

variables:
# Coalesce the target and source branches so we know when a PR targets a release branch
Expand Down
6 changes: 3 additions & 3 deletions eng/common/templates/job/job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,16 @@ jobs:
sbomEnabled: false # we don't need SBOM for logs

- ${{ if ne(parameters.enablePublishBuildArtifacts, 'false') }}:
- template: /eng/common/core-templates/steps/publish-build-artifacts.yml
- template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml
parameters:
is1ESPipeline: false
args:
displayName: Publish Logs
pathToPublish: '$(Build.ArtifactStagingDirectory)/artifacts/log/$(_BuildConfig)'
publishLocation: Container
targetPath: '$(Build.ArtifactStagingDirectory)/artifacts/log/$(_BuildConfig)'
artifactName: ${{ coalesce(parameters.enablePublishBuildArtifacts.artifactName, '$(Agent.Os)_$(Agent.JobName)_Attempt$(System.JobAttempt)' ) }}
continueOnError: true
condition: always()
sbomEnabled: false

- ${{ if eq(parameters.enableBuildRetry, 'true') }}:
- template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml
Expand Down
2 changes: 1 addition & 1 deletion eng/common/templates/variables/pool-providers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#
# pool:
# name: $(DncEngInternalBuildPool)
# demands: ImageOverride -equals windows.vs2022.amd64
# demands: ImageOverride -equals windows.vs2026.amd64
variables:
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
- template: /eng/common/templates-official/variables/pool-providers.yml
Expand Down
103 changes: 85 additions & 18 deletions eng/common/tools.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,6 @@ function LocateVisualStudio([object]$vsRequirements = $null){
if (Get-Member -InputObject $GlobalJson.tools -Name 'vswhere') {
$vswhereVersion = $GlobalJson.tools.vswhere
} else {
# keep this in sync with the VSWhereVersion in DefaultVersions.props
$vswhereVersion = '3.1.7'
}

Expand Down Expand Up @@ -680,7 +679,17 @@ function GetNuGetPackageCachePath() {

# Returns a full path to an Arcade SDK task project file.
function GetSdkTaskProject([string]$taskName) {
return Join-Path (Split-Path (InitializeToolset) -Parent) "SdkTasks\$taskName.proj"
$toolsetDir = Split-Path (InitializeToolset) -Parent
$proj = Join-Path $toolsetDir "$taskName.proj"
if (Test-Path $proj) {
return $proj
}
# TODO: Remove this fallback once all supported versions use the new layout.
$legacyProj = Join-Path $toolsetDir "SdkTasks\$taskName.proj"
if (Test-Path $legacyProj) {
return $legacyProj
}
throw "Unable to find $taskName.proj in toolset at: $toolsetDir"
}

function InitializeNativeTools() {
Expand Down Expand Up @@ -717,35 +726,59 @@ function InitializeToolset() {
$nugetCache = GetNuGetPackageCachePath

$toolsetVersion = Read-ArcadeSdkVersion
$toolsetLocationFile = Join-Path $ToolsetDir "$toolsetVersion.txt"
$toolsetToolsDir = Join-Path $ToolsetDir $toolsetVersion

if (Test-Path $toolsetLocationFile) {
$path = Get-Content $toolsetLocationFile -TotalCount 1
if (Test-Path $path) {
return $global:_InitializeToolset = $path
}
# Check if the toolset has already been extracted
$toolsetBuildProj = $null
$buildProjPath = Join-Path $toolsetToolsDir 'Build.proj'

if (Test-Path $buildProjPath) {
$toolsetBuildProj = $buildProjPath
}

if ($toolsetBuildProj -ne $null) {
return $global:_InitializeToolset = $toolsetBuildProj
}

if (-not $restore) {
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Toolset version $toolsetVersion has not been restored."
ExitWithExitCode 1
}

$buildTool = InitializeBuildTool
$downloadArgs = @("package", "download", "Microsoft.DotNet.Arcade.Sdk@$toolsetVersion", "--prerelease", "--output", "$nugetCache")
if ($env:NUGET_CONFIG) {
$downloadArgs += "--configfile"
$downloadArgs += $env:NUGET_CONFIG
}
DotNet @downloadArgs

$proj = Join-Path $ToolsetDir 'restore.proj'
$bl = if ($binaryLog) { '/bl:' + (Join-Path $LogDir 'ToolsetRestore.binlog') } else { '' }
$packageDir = Join-Path $nugetCache (Join-Path 'microsoft.dotnet.arcade.sdk' $toolsetVersion)
$packageToolsetDir = Join-Path $packageDir 'toolset'
$packageToolsDir = Join-Path $packageDir 'tools'

'<Project Sdk="Microsoft.DotNet.Arcade.Sdk"/>' | Set-Content $proj
# TODO: Remove the tools/ check once all supported versions have the toolset folder.
if (!(Test-Path $packageToolsetDir) -and !(Test-Path $packageToolsDir)) {
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Arcade SDK package does not contain a toolset or tools folder: $packageDir"
ExitWithExitCode 3
}

MSBuild-Core $proj $bl /t:__WriteToolsetLocation /clp:ErrorsOnly`;NoSummary /p:__ToolsetLocationOutputFile=$toolsetLocationFile
New-Item -ItemType Directory -Path $toolsetToolsDir -Force | Out-Null

$path = Get-Content $toolsetLocationFile -Encoding UTF8 -TotalCount 1
if (!(Test-Path $path)) {
throw "Invalid toolset path: $path"
# Copy toolset if present at the package root (new layout), otherwise fall back to tools
if (Test-Path $packageToolsetDir) {
Copy-Item -Path "$packageToolsetDir\*" -Destination $toolsetToolsDir -Recurse -Force
} else {
# TODO: Remove this fallback once all supported versions have the toolset folder.
Copy-Item -Path "$packageToolsDir\*" -Destination $toolsetToolsDir -Recurse -Force
}

return $global:_InitializeToolset = $path
if (Test-Path $buildProjPath) {
$toolsetBuildProj = $buildProjPath
} else {
throw "Unable to find Build.proj in toolset at: $toolsetToolsDir"
}

return $global:_InitializeToolset = $toolsetBuildProj
}

function ExitWithExitCode([int] $exitCode) {
Expand Down Expand Up @@ -806,6 +839,40 @@ function MSBuild() {
MSBuild-Core @args
}

#
# Executes a dotnet command with arguments passed to the function.
# Terminates the script if the command fails.
#
function DotNet() {
$dotnetRoot = InitializeDotNetCli -install:$restore
$dotnetPath = Join-Path $dotnetRoot (GetExecutableFileName 'dotnet')

$cmdArgs = ""
foreach ($arg in $args) {
if ($null -ne $arg -and $arg.Trim() -ne "") {
if ($arg.EndsWith('\')) {
$arg = $arg + "\"
}
$cmdArgs += " `"$arg`""
}
}

$env:ARCADE_BUILD_TOOL_COMMAND = "`"$dotnetPath`" $cmdArgs"

$exitCode = Exec-Process $dotnetPath $cmdArgs

if ($exitCode -ne 0) {
Write-Host "dotnet command failed with exit code $exitCode. Check errors above." -ForegroundColor Red

if ($ci -and $env:SYSTEM_TEAMPROJECT -ne $null -and !$fromVMR) {
Write-PipelineSetResult -Result "Failed" -Message "dotnet command execution failed."
ExitWithExitCode 0
} else {
ExitWithExitCode $exitCode
}
}
}

#
# Executes msbuild (or 'dotnet msbuild') with arguments passed to the function.
# The arguments are automatically quoted.
Expand Down Expand Up @@ -842,7 +909,7 @@ function MSBuild-Core() {
$cmdArgs += ' /p:TreatWarningsAsErrors=false'
}

if ($warnNotAsError) {
if ($warnAsError -and $warnNotAsError) {
$cmdArgs += " /warnnotaserror:$warnNotAsError /p:AdditionalWarningsNotAsErrors=$warnNotAsError"
}

Expand Down
Loading