Skip to content

Commit c349f75

Browse files
dotnet-maestro[bot]CopilotwtgodbeViktorHoferakoeplinger
authored
[main] Source code updates from dotnet/dotnet (#68489)
* Backflow from https://github.com/dotnet/dotnet / 7cdb217 build 326717 Diff: https://github.com/dotnet/dotnet/compare/7cdb217445905f3342bbb0266a4497b9a014389a..7cdb217445905f3342bbb0266a4497b9a014389a From: dotnet/dotnet@7cdb217 To: dotnet/dotnet@7cdb217 [[ commit created by automation ]] * Update dependencies from build 326717 Updated Dependencies: Microsoft.NET.Runtime.WebAssembly.Sdk, Microsoft.NETCore.BrowserDebugHost.Transport, Microsoft.NET.Runtime.MonoAOTCompiler.Task, dotnet-ef, Microsoft.Bcl.AsyncInterfaces, Microsoft.Bcl.Cryptography, Microsoft.Bcl.TimeProvider, Microsoft.EntityFrameworkCore, Microsoft.EntityFrameworkCore.Design, Microsoft.EntityFrameworkCore.InMemory, Microsoft.EntityFrameworkCore.Relational, Microsoft.EntityFrameworkCore.Sqlite, Microsoft.EntityFrameworkCore.SqlServer, Microsoft.EntityFrameworkCore.Tools, Microsoft.Extensions.Caching.Abstractions, Microsoft.Extensions.Caching.Memory, Microsoft.Extensions.Configuration, Microsoft.Extensions.Configuration.Abstractions, Microsoft.Extensions.Configuration.Binder, Microsoft.Extensions.Configuration.CommandLine, Microsoft.Extensions.Configuration.EnvironmentVariables, Microsoft.Extensions.Configuration.FileExtensions, Microsoft.Extensions.Configuration.Ini, Microsoft.Extensions.Configuration.Json, Microsoft.Extensions.Configuration.UserSecrets, Microsoft.Extensions.Configuration.Xml, Microsoft.Extensions.DependencyInjection, Microsoft.Extensions.DependencyInjection.Abstractions, Microsoft.Extensions.DependencyModel, Microsoft.Extensions.Diagnostics, Microsoft.Extensions.Diagnostics.Abstractions, Microsoft.Extensions.FileProviders.Abstractions, Microsoft.Extensions.FileProviders.Composite, Microsoft.Extensions.FileProviders.Physical, Microsoft.Extensions.FileSystemGlobbing, Microsoft.Extensions.HostFactoryResolver.Sources, Microsoft.Extensions.Hosting, Microsoft.Extensions.Hosting.Abstractions, Microsoft.Extensions.Http, Microsoft.Extensions.Logging, Microsoft.Extensions.Logging.Abstractions, Microsoft.Extensions.Logging.Configuration, Microsoft.Extensions.Logging.Console, Microsoft.Extensions.Logging.Debug, Microsoft.Extensions.Logging.EventLog, Microsoft.Extensions.Logging.EventSource, Microsoft.Extensions.Logging.TraceSource, Microsoft.Extensions.Options, Microsoft.Extensions.Options.ConfigurationExtensions, Microsoft.Extensions.Options.DataAnnotations, Microsoft.Extensions.Primitives, Microsoft.Internal.Runtime.AspNetCore.Transport, Microsoft.NETCore.App.Ref, Microsoft.NETCore.Platforms, System.Collections.Immutable, System.Composition, System.Configuration.ConfigurationManager, System.Diagnostics.DiagnosticSource, System.Diagnostics.EventLog, System.Diagnostics.PerformanceCounter, System.DirectoryServices.Protocols, System.Formats.Asn1, System.Formats.Cbor, System.IO.Hashing, System.IO.Pipelines, System.Memory.Data, System.Net.Http.Json, System.Net.Http.WinHttpHandler, System.Net.ServerSentEvents, System.Numerics.Tensors, System.Reflection.Metadata, System.Resources.Extensions, System.Runtime.Caching, System.Security.Cryptography.Pkcs, System.Security.Cryptography.Xml, System.Security.Permissions, System.ServiceProcess.ServiceController, System.Text.Encodings.Web, System.Text.Json, System.Threading.AccessControl, System.Threading.Channels, System.Threading.RateLimiting (Version 11.0.0-rc.1.26410.101 -> 11.0.0-rc.1.26411.119) Microsoft.DotNet.Arcade.Sdk, Microsoft.DotNet.Build.Tasks.Archives, Microsoft.DotNet.Build.Tasks.Installers, Microsoft.DotNet.Build.Tasks.Templating, Microsoft.DotNet.Helix.Sdk, Microsoft.DotNet.RemoteExecutor, Microsoft.DotNet.SharedFramework.Sdk (Version 11.0.0-beta.26410.101 -> 11.0.0-beta.26411.119) Microsoft.DotNet.Helix.JobMonitor (Version 11.0.0-beta.26412.2 -> 11.0.0-beta.26411.119) Microsoft.Web.Xdt (Version 3.3.0-rc.1.26410.101 -> 3.3.0-rc.1.26411.119) NuGet.Frameworks, NuGet.Packaging, NuGet.Versioning (Version 7.11.0-rc.41101 -> 7.11.0-rc.65534) [[ commit created by automation ]] * Align dotnet tool versions Co-authored-by: wtgodbe <14283640+wtgodbe@users.noreply.github.com> * Resolve NU1903 NuGet Audit warnings in RepoTasks --------- Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: wtgodbe <14283640+wtgodbe@users.noreply.github.com> Co-authored-by: Viktor Hofer <7412651+ViktorHofer@users.noreply.github.com> Co-authored-by: William Godbe <wigodbe@microsoft.com> Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
1 parent 6ce0ffb commit c349f75

19 files changed

Lines changed: 409 additions & 361 deletions

.azure/pipelines/ci-public.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ stages:
668668
displayName: Update submodules
669669
- script: ./restore.cmd
670670
displayName: Run restore.cmd
671-
- powershell: ./eng/build.ps1 -all -noBuildJava -noBuildNodeJS "-WarnAsError:false"
671+
- powershell: ./eng/build.ps1 -all -noBuildJava -noBuildNodeJS -warnAsError 0
672672
displayName: Build (No NodeJS)
673673
- script: npm run build
674674
displayName: Build JS

.config/dotnet-tools.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33
"isRoot": true,
44
"tools": {
55
"dotnet-dump": {
6-
"version": "6.0.408101",
6+
"version": "6.0.322601",
77
"commands": [
88
"dotnet-dump"
99
]
1010
},
1111
"dotnet-ef": {
12-
"version": "11.0.0-rc.1.26410.101",
12+
"version": "11.0.0-rc.1.26411.119",
1313
"commands": [
1414
"dotnet-ef"
1515
]
1616
},
1717
"dotnet-serve": {
18-
"version": "1.10.194",
18+
"version": "1.10.93",
1919
"commands": [
2020
"dotnet-serve"
2121
]
@@ -33,4 +33,4 @@
3333
]
3434
}
3535
}
36-
}
36+
}

eng/Version.Details.props

Lines changed: 95 additions & 96 deletions
Large diffs are not rendered by default.

eng/Version.Details.xml

Lines changed: 187 additions & 187 deletions
Large diffs are not rendered by default.

eng/build.ps1

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,14 @@ Build the repository in product mode (short: -pb).
9999
.PARAMETER fromVMR
100100
Set when building from within the VMR.
101101
102+
.PARAMETER MSBuildMultiThreaded
103+
Sets MSBuild's multi-threaded mode, i.e. the -mt switch (short: -mt). Opt-in for now, so off unless it is
104+
explicitly requested.
105+
106+
.PARAMETER NodeReuse
107+
Sets the nodereuse msbuild parameter. Node reuse is disabled by default in this repository as a workaround for
108+
issues with custom task assemblies; passing this parameter explicitly overrides that.
109+
102110
.EXAMPLE
103111
Building both native and managed projects.
104112
@@ -200,9 +208,19 @@ param(
200208
# Intentionally lowercase as tools.ps1 depends on it
201209
[switch]$fromVMR,
202210

211+
# Passed through to tools.ps1 MSBuild function
212+
[bool]$warnAsError = $true,
213+
203214
# Passed through to tools.ps1 MSBuild function
204215
[string]$warnNotAsError = '',
205216

217+
# Passed through to tools.ps1 MSBuild function
218+
[Alias('mt')]
219+
[bool]$msbuildMultiThreaded = $false,
220+
221+
# Passed through to tools.ps1 MSBuild function
222+
[bool]$nodeReuse = $false,
223+
206224
# Capture the rest
207225
[Parameter(ValueFromRemainingArguments = $true)]
208226
[string[]]$MSBuildArguments

eng/build.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ product_build=''
3737
from_vmr=''
3838
warn_as_error=true
3939
warn_not_as_error=''
40+
# Empty means "not specified"; tools.sh leaves it off unless it's explicitly requested.
41+
msbuild_multi_threaded=''
4042
from_vmr=''
4143

4244
source "$DIR/common/native/init-os-and-arch.sh"
@@ -84,6 +86,8 @@ Options:
8486
--verbosity|-v MSBuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]
8587
--warnAsError Sets warnaserror msbuild parameter: 'true' or 'false'
8688
--warnNotAsError Sets a semi-colon delimited list of warning codes that should not be treated as errors
89+
--msbuildMultiThreaded|--mt Sets MSBuild's multi-threaded mode, i.e. the -mt switch: 'true' or 'false'
90+
--nodeReuse Sets nodereuse msbuild parameter: 'true' or 'false'
8791
8892
--runtime-source-feed Additional feed that can be used when downloading .NET runtimes and SDKs
8993
--runtime-source-feed-key Key for feed that can be used when downloading .NET runtimes and SDKs
@@ -265,6 +269,16 @@ while [[ $# -gt 0 ]]; do
265269
[ -z "${1:-}" ] && __error "Missing value for parameter --warnNotAsError" && __usage
266270
warn_not_as_error="${1:-}"
267271
;;
272+
-msbuildmultithreaded|-mt)
273+
shift
274+
[ -z "${1:-}" ] && __error "Missing value for parameter --msbuildMultiThreaded" && __usage
275+
msbuild_multi_threaded="${1:-}"
276+
;;
277+
-nodereuse)
278+
shift
279+
[ -z "${1:-}" ] && __error "Missing value for parameter --nodeReuse" && __usage
280+
node_reuse="${1:-}"
281+
;;
268282
*)
269283
msbuild_args[${#msbuild_args[*]}]="$1"
270284
;;

eng/common/SetupNugetSources.ps1

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# condition: eq(variables['Agent.OS'], 'Windows_NT')
1212
# inputs:
1313
# filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1
14-
# arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config -Password $Env:Token
14+
# arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config
1515
# env:
1616
# Token: $(InternalFeedToken)
1717
#
@@ -29,12 +29,14 @@
2929
[CmdletBinding()]
3030
param (
3131
[Parameter(Mandatory = $true)][string]$ConfigFile,
32-
$Password
32+
# Keep the legacy name as an alias while callers migrate secrets to the Token environment variable.
33+
[Alias("Password")]$Credential
3334
)
3435

3536
$ErrorActionPreference = "Stop"
3637
Set-StrictMode -Version 2.0
3738
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
39+
$feedCredential = if ($env:Token) { $env:Token } else { $Credential }
3840

3941
# This script only consumes helper functions from tools.ps1 to configure NuGet feeds.
4042
# Skip importing configure-toolset.ps1 so that repo-specific toolset setup (e.g. acquiring
@@ -44,14 +46,14 @@ $disableConfigureToolsetImport = $true
4446
. $PSScriptRoot\tools.ps1
4547

4648
# Adds or enables the package source with the given name
47-
function AddOrEnablePackageSource($sources, $disabledPackageSources, $SourceName, $SourceEndPoint, $creds, $Username, $pwd) {
48-
if ($disabledPackageSources -eq $null -or -not (EnableInternalPackageSource -DisabledPackageSources $disabledPackageSources -Creds $creds -PackageSourceName $SourceName)) {
49-
AddPackageSource -Sources $sources -SourceName $SourceName -SourceEndPoint $SourceEndPoint -Creds $creds -Username $userName -pwd $Password
49+
function AddOrEnablePackageSource($sources, $disabledPackageSources, $SourceName, $SourceEndPoint, $creds, $Username, $credential) {
50+
if ($disabledPackageSources -eq $null -or -not (EnableInternalPackageSource -DisabledPackageSources $disabledPackageSources -Creds $creds -PackageSourceName $SourceName -Credential $credential)) {
51+
AddPackageSource -Sources $sources -SourceName $SourceName -SourceEndPoint $SourceEndPoint -Creds $creds -Username $Username -credential $credential
5052
}
5153
}
5254

5355
# Add source entry to PackageSources
54-
function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Username, $pwd) {
56+
function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Username, $credential) {
5557
$packageSource = $sources.SelectSingleNode("add[@key='$SourceName']")
5658

5759
if ($packageSource -eq $null)
@@ -67,13 +69,13 @@ function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Usern
6769
Write-Host "Package source $SourceName already present and enabled."
6870
}
6971

70-
AddCredential -Creds $creds -Source $SourceName -Username $Username -pwd $pwd
72+
AddCredential -Creds $creds -Source $SourceName -Username $Username -credential $credential
7173
}
7274

7375
# Add a credential node for the specified source
74-
function AddCredential($creds, $source, $username, $pwd) {
76+
function AddCredential($creds, $source, $username, $credential) {
7577
# If no cred supplied, don't do anything.
76-
if (!$pwd) {
78+
if (!$credential) {
7779
return;
7880
}
7981

@@ -108,27 +110,27 @@ function AddCredential($creds, $source, $username, $pwd) {
108110
$sourceElement.AppendChild($passwordElement) | Out-Null
109111
}
110112

111-
$passwordElement.SetAttribute("value", $pwd)
113+
$passwordElement.SetAttribute("value", $credential)
112114
}
113115

114116
# Enable all darc-int package sources.
115-
function EnableMaestroInternalPackageSources($DisabledPackageSources, $Creds) {
117+
function EnableMaestroInternalPackageSources($DisabledPackageSources, $Creds, $Credential) {
116118
$maestroInternalSources = $DisabledPackageSources.SelectNodes("add[contains(@key,'darc-int')]")
117119
ForEach ($DisabledPackageSource in $maestroInternalSources) {
118-
EnableInternalPackageSource -DisabledPackageSources $DisabledPackageSources -Creds $Creds -PackageSourceName $DisabledPackageSource.key
120+
EnableInternalPackageSource -DisabledPackageSources $DisabledPackageSources -Creds $Creds -PackageSourceName $DisabledPackageSource.key -Credential $Credential
119121
}
120122
}
121123

122124
# Enables an internal package source by name, if found. Returns true if the package source was found and enabled, false otherwise.
123-
function EnableInternalPackageSource($DisabledPackageSources, $Creds, $PackageSourceName) {
125+
function EnableInternalPackageSource($DisabledPackageSources, $Creds, $PackageSourceName, $Credential) {
124126
$DisabledPackageSource = $DisabledPackageSources.SelectSingleNode("add[@key='$PackageSourceName']")
125127
if ($DisabledPackageSource) {
126128
Write-Host "Enabling internal source '$($DisabledPackageSource.key)'."
127129

128130
# Due to https://github.com/NuGet/Home/issues/10291, we must actually remove the disabled entries
129131
$DisabledPackageSources.RemoveChild($DisabledPackageSource)
130132

131-
AddCredential -Creds $creds -Source $DisabledPackageSource.Key -Username $userName -pwd $Password
133+
AddCredential -Creds $creds -Source $DisabledPackageSource.Key -Username $userName -credential $credential
132134
return $true
133135
}
134136
return $false
@@ -153,7 +155,7 @@ if ($sources -eq $null) {
153155

154156
$creds = $null
155157
$feedSuffix = "v3/index.json"
156-
if ($Password) {
158+
if ($feedCredential) {
157159
$feedSuffix = "v2"
158160
# Looks for a <PackageSourceCredentials> node. Create it if none is found.
159161
$creds = $doc.DocumentElement.SelectSingleNode("packageSourceCredentials")
@@ -169,16 +171,16 @@ $userName = "dn-bot"
169171
$disabledSources = $doc.DocumentElement.SelectSingleNode("disabledPackageSources")
170172
if ($disabledSources -ne $null) {
171173
Write-Host "Checking for any darc-int disabled package sources in the disabledPackageSources node"
172-
EnableMaestroInternalPackageSources -DisabledPackageSources $disabledSources -Creds $creds
174+
EnableMaestroInternalPackageSources -DisabledPackageSources $disabledSources -Creds $creds -Credential $feedCredential
173175
}
174176
$dotnetVersions = @('5','6','7','8','9','10')
175177

176178
foreach ($dotnetVersion in $dotnetVersions) {
177179
$feedPrefix = "dotnet" + $dotnetVersion;
178180
$dotnetSource = $sources.SelectSingleNode("add[@key='$feedPrefix']")
179181
if ($dotnetSource -ne $null) {
180-
AddOrEnablePackageSource -Sources $sources -DisabledPackageSources $disabledSources -SourceName "$feedPrefix-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal/nuget/$feedSuffix" -Creds $creds -Username $userName -pwd $Password
181-
AddOrEnablePackageSource -Sources $sources -DisabledPackageSources $disabledSources -SourceName "$feedPrefix-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal-transport/nuget/$feedSuffix" -Creds $creds -Username $userName -pwd $Password
182+
AddOrEnablePackageSource -Sources $sources -DisabledPackageSources $disabledSources -SourceName "$feedPrefix-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal/nuget/$feedSuffix" -Creds $creds -Username $userName -credential $feedCredential
183+
AddOrEnablePackageSource -Sources $sources -DisabledPackageSources $disabledSources -SourceName "$feedPrefix-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal-transport/nuget/$feedSuffix" -Creds $creds -Username $userName -credential $feedCredential
182184
}
183185
}
184186

eng/common/SetupNugetSources.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
# This logic is also abstracted into enable-internal-sources.yml.
2525

2626
ConfigFile=$1
27-
CredToken=$2
27+
# Prefer the environment variable so credentials do not appear in process arguments.
28+
# Retain the positional argument as a compatibility fallback for existing callers.
29+
CredToken=${Token:-$2}
2830
NL='\n'
2931
TB=' '
3032

eng/common/build.ps1

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Param(
88
[bool] $warnAsError = $true,
99
[string] $warnNotAsError = '',
1010
[bool] $nodeReuse = $true,
11+
[bool][Alias('mt')]$msbuildMultiThreaded = $false,
1112
[switch] $buildCheck = $false,
1213
[switch][Alias('r')]$restore,
1314
[switch] $deployDeps,
@@ -79,6 +80,7 @@ function Print-Usage() {
7980
Write-Host " -excludePrereleaseVS Set to exclude build engines in prerelease versions of Visual Studio"
8081
Write-Host " -nativeToolsOnMachine Sets the native tools on machine environment variable (indicating that the script should use native tools on machine)"
8182
Write-Host " -nodeReuse <value> Sets nodereuse msbuild parameter ('true' or 'false')"
83+
Write-Host " -msbuildMultiThreaded <value> Sets MSBuild's multi-threaded mode, i.e. the -mt switch ('1' or '0') (short: -mt)"
8284
Write-Host " -buildCheck Sets /check msbuild parameter"
8385
Write-Host " -fromVMR Set when building from within the VMR"
8486
Write-Host " -disablePipelineSetResult Set to disable masking the actual exit code in the pipeline when the build fails"
@@ -175,9 +177,8 @@ try {
175177
if (-not $excludeCIBinarylog) {
176178
$binaryLog = $true
177179
}
178-
# Disable node reuse on CI unless explicitly opted in via MSBUILD_NODEREUSE_ENABLED.
179-
# Internal testing only; this env var will be replaced with a switch (https://github.com/dotnet/arcade/issues/17013) and must not be depended on.
180-
if ($env:MSBUILD_NODEREUSE_ENABLED -ne "1") {
180+
# Node reuse isn't used on CI unless it was explicitly requested via -nodeReuse.
181+
if (-not $PSBoundParameters.ContainsKey('nodeReuse')) {
181182
$nodeReuse = $false
182183
}
183184
}

eng/common/build.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ usage()
4343
echo " --pipelinesLog Promote msbuild errors/warnings to Azure Pipelines timeline issues; defaults to on in CI (short: -pl)"
4444
echo " --prepareMachine Prepare machine for CI run, clean up processes after build"
4545
echo " --nodeReuse <value> Sets nodereuse msbuild parameter ('true' or 'false')"
46+
echo " --msbuildMultiThreaded <value> Sets MSBuild's multi-threaded mode, i.e. the -mt switch ('true' or 'false') (short: --mt)"
4647
echo " --warnAsError <value> Sets warnaserror msbuild parameter ('true' or 'false')"
4748
echo " --warnNotAsError <value> Sets a semi-colon delimited list of warning codes that should not be treated as errors"
4849
echo " --buildCheck <value> Sets /check msbuild parameter"
@@ -84,7 +85,9 @@ clean=false
8485

8586
warn_as_error=true
8687
warn_not_as_error=''
87-
node_reuse=true
88+
# Empty means "not specified"; tools.sh defaults these to on for local builds and off on CI.
89+
node_reuse=''
90+
msbuild_multi_threaded=''
8891
build_check=false
8992
binary_log=false
9093
binary_log_name=''
@@ -199,6 +202,10 @@ while [[ $# -gt 0 ]]; do
199202
node_reuse=$2
200203
shift
201204
;;
205+
-msbuildmultithreaded|-mt)
206+
msbuild_multi_threaded=$2
207+
shift
208+
;;
202209
-buildcheck)
203210
build_check=true
204211
;;
@@ -224,11 +231,6 @@ fi
224231

225232
if [[ "$ci" == true ]]; then
226233
pipelines_log=true
227-
# Disable node reuse on CI unless explicitly opted in via MSBUILD_NODEREUSE_ENABLED.
228-
# Internal testing only; this env var will be replaced with a switch (https://github.com/dotnet/arcade/issues/17013) and must not be depended on.
229-
if [[ "${MSBUILD_NODEREUSE_ENABLED:-}" != "1" ]]; then
230-
node_reuse=false
231-
fi
232234
if [[ "$exclude_ci_binary_log" == false ]]; then
233235
binary_log=true
234236
fi

0 commit comments

Comments
 (0)