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
6 changes: 3 additions & 3 deletions eng/Version.Details.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ This file should be imported by eng/Versions.props
<!-- dotnet-android dependencies -->
<XamarinAndroidToolsAndroidSdkPackageVersion>1.0.105-preview.225</XamarinAndroidToolsAndroidSdkPackageVersion>
<!-- dotnet-arcade dependencies -->
<MicrosoftDotNetArcadeSdkPackageVersion>10.0.0-beta.26406.9</MicrosoftDotNetArcadeSdkPackageVersion>
<MicrosoftDotNetCodeAnalysisPackageVersion>10.0.0-beta.26406.9</MicrosoftDotNetCodeAnalysisPackageVersion>
<MicrosoftDotNetRemoteExecutorPackageVersion>10.0.0-beta.26406.9</MicrosoftDotNetRemoteExecutorPackageVersion>
<MicrosoftDotNetArcadeSdkPackageVersion>10.0.0-beta.26414.3</MicrosoftDotNetArcadeSdkPackageVersion>
<MicrosoftDotNetCodeAnalysisPackageVersion>10.0.0-beta.26414.3</MicrosoftDotNetCodeAnalysisPackageVersion>
<MicrosoftDotNetRemoteExecutorPackageVersion>10.0.0-beta.26414.3</MicrosoftDotNetRemoteExecutorPackageVersion>
<!-- dotnet-command-line-api dependencies -->
<SystemCommandLinePackageVersion>2.0.0-beta5.25210.1</SystemCommandLinePackageVersion>
<!-- dotnet-dotnet dependencies -->
Expand Down
12 changes: 6 additions & 6 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.26406.9">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.26414.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>af57946065838fca9b1745ab055d5a15a4783fba</Sha>
<Sha>caa49f7726ab75f513f2fb814030657cf1afc0e4</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="10.0.0-beta.26406.9">
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="10.0.0-beta.26414.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>af57946065838fca9b1745ab055d5a15a4783fba</Sha>
<Sha>caa49f7726ab75f513f2fb814030657cf1afc0e4</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="10.0.0-beta.26406.9">
<Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="10.0.0-beta.26414.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>af57946065838fca9b1745ab055d5a15a4783fba</Sha>
<Sha>caa49f7726ab75f513f2fb814030657cf1afc0e4</Sha>
</Dependency>
<!-- dotnet/installer: Testing version of the SDK. Needed for the signed & entitled host. -->
<Dependency Name="Microsoft.NET.Sdk" Version="11.0.100-rc.1.26410.101">
Expand Down
18 changes: 14 additions & 4 deletions eng/common/Get-GitHubAppToken.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,13 @@ try {
$installations = @()
$page = 1
do {
$pageInstallations = @(Invoke-RestMethod `
# Assign the response before wrapping it in @(). PowerShell otherwise
# preserves a top-level JSON array as one nested pipeline object.
$pageResponse = Invoke-RestMethod `
-Uri "https://api.github.com/app/installations?per_page=100&page=$page" `
-Headers $headers `
-Method Get)
-Method Get
$pageInstallations = @($pageResponse)
$installations += $pageInstallations
$page++
} while ($pageInstallations.Count -eq 100)
Expand All @@ -125,12 +128,19 @@ catch {
Write-PipelineTelemetryError -Category 'Build' -Message "Failed to list GitHub App installations: $_. The signed JWT may be invalid or the App's Client ID ('$AppClientId') may be incorrect."
exit 1
}
$installation = $installations | Where-Object { $_.account.login -ieq $InstallationOwner } | Select-Object -First 1
if (-not $installation) {
$matchingInstallations = @($installations | Where-Object { $_.account.login -ieq $InstallationOwner })
if ($matchingInstallations.Count -eq 0) {
$found = ($installations | ForEach-Object { $_.account.login }) -join ', '
Write-PipelineTelemetryError -Category 'Build' -Message "No installation found for '$InstallationOwner'. App is installed on: $found"
exit 1
}
if ($matchingInstallations.Count -ne 1) {
$matchingIds = ($matchingInstallations | ForEach-Object { $_.id }) -join ', '
Write-PipelineTelemetryError -Category 'Build' -Message "Found multiple installations for '$InstallationOwner': $matchingIds"
exit 1
}
$installation = $matchingInstallations[0]
Write-Host "Using installation $($installation.id) for '$($installation.account.login)'."

try {
$tokenResponse = Invoke-RestMethod `
Expand Down
2 changes: 2 additions & 0 deletions eng/common/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Param(
[string][Alias('v')]$verbosity = "minimal",
[string] $msbuildEngine = $null,
[bool] $warnAsError = $true,
[string] $warnNotAsError = '',
[bool] $nodeReuse = $true,
[switch] $buildCheck = $false,
[switch][Alias('r')]$restore,
Expand Down Expand Up @@ -70,6 +71,7 @@ function Print-Usage() {
Write-Host " -excludeCIBinarylog Don't output binary log (short: -nobl)"
Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build"
Write-Host " -warnAsError <value> Sets warnaserror msbuild parameter ('true' or 'false')"
Write-Host " -warnNotAsError <value> Sets a semi-colon delimited list of warning codes that should not be treated as errors"
Write-Host " -msbuildEngine <value> Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
Write-Host " -excludePrereleaseVS Set to exclude build engines in prerelease versions of Visual Studio"
Write-Host " -nativeToolsOnMachine Sets the native tools on machine environment variable (indicating that the script should use native tools on machine)"
Expand Down
6 changes: 6 additions & 0 deletions eng/common/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ usage()
echo " --prepareMachine Prepare machine for CI run, clean up processes after build"
echo " --nodeReuse <value> Sets nodereuse msbuild parameter ('true' or 'false')"
echo " --warnAsError <value> Sets warnaserror msbuild parameter ('true' or 'false')"
echo " --warnNotAsError <value> Sets a semi-colon delimited list of warning codes that should not be treated as errors"
echo " --buildCheck <value> Sets /check msbuild parameter"
echo " --fromVMR Set when building from within the VMR"
echo ""
Expand Down Expand Up @@ -78,6 +79,7 @@ ci=false
clean=false

warn_as_error=true
warn_not_as_error=''
node_reuse=true
build_check=false
binary_log=false
Expand Down Expand Up @@ -176,6 +178,10 @@ while [[ $# > 0 ]]; do
warn_as_error=$2
shift
;;
-warnnotaserror)
warn_not_as_error=$2
shift
;;
-nodereuse)
node_reuse=$2
shift
Expand Down
8 changes: 8 additions & 0 deletions eng/common/tools.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
# Configures warning treatment in msbuild.
[bool]$warnAsError = if (Test-Path variable:warnAsError) { $warnAsError } else { $true }

# Specifies semi-colon delimited list of warning codes that should not be treated as errors.
[string]$warnNotAsError = if (Test-Path variable:warnNotAsError) { $warnNotAsError } else { '' }

# Specifies which msbuild engine to use for build: 'vs', 'dotnet' or unspecified (determined based on presence of tools.vs in global.json).
[string]$msbuildEngine = if (Test-Path variable:msbuildEngine) { $msbuildEngine } else { $null }

Expand Down Expand Up @@ -836,6 +839,11 @@ function MSBuild-Core() {
$cmdArgs += ' /p:TreatWarningsAsErrors=false'
}

if ($warnAsError -and $warnNotAsError) {
$escapedWarnNotAsError = $warnNotAsError -replace ';', '%3B'
$cmdArgs += " /warnnotaserror:$warnNotAsError /p:AdditionalWarningsNotAsErrors=$escapedWarnNotAsError"
}

foreach ($arg in $args) {
if ($null -ne $arg -and $arg.Trim() -ne "") {
if ($arg.EndsWith('\')) {
Expand Down
10 changes: 9 additions & 1 deletion eng/common/tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ fi
# Configures warning treatment in msbuild.
warn_as_error=${warn_as_error:-true}

# Specifies semi-colon delimited list of warning codes that should not be treated as errors.
warn_not_as_error=${warn_not_as_error:-''}

# True to attempt using .NET Core already that meets requirements specified in global.json
# installed on the machine instead of downloading one.
use_installed_dotnet_cli=${use_installed_dotnet_cli:-true}
Expand Down Expand Up @@ -532,7 +535,12 @@ function MSBuild-Core {
mt_switch="-mt"
fi

RunBuildTool "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch $mt_switch /p:TreatWarningsAsErrors=$warn_as_error /p:ContinuousIntegrationBuild=$ci "$@"
local warnnotaserror_switch=""
if [[ -n "$warn_not_as_error" && "$warn_as_error" == true ]]; then
warnnotaserror_switch="/warnnotaserror:$warn_not_as_error /p:AdditionalWarningsNotAsErrors=${warn_not_as_error//;/%3B}"
fi

RunBuildTool "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch $mt_switch $warnnotaserror_switch /p:TreatWarningsAsErrors=$warn_as_error /p:ContinuousIntegrationBuild=$ci "$@"
}

function GetDarc {
Expand Down
6 changes: 3 additions & 3 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"sdk": {
"version": "10.0.110",
"version": "10.0.111",
"allowPrerelease": true,
"rollForward": "major"
},
"tools": {
"dotnet": "10.0.110",
"dotnet": "10.0.111",
"runtimes": {
"dotnet/x86": [
"$(MicrosoftNETCoreApp100Version)"
Expand All @@ -15,6 +15,6 @@
"msbuild-sdks": {
"Microsoft.Build.NoTargets": "3.7.0",
"Microsoft.Build.Traversal": "3.4.0",
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26406.9"
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26414.3"
}
}