Skip to content

Commit ae4e61f

Browse files
authored
Merge branch 'main' into copilot/fix-24591
2 parents 5163b83 + 46538f9 commit ae4e61f

File tree

568 files changed

+10651
-4131
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

568 files changed

+10651
-4131
lines changed

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"microsoft.dotnet.darc": {
6-
"version": "1.1.0-beta.25319.4",
6+
"version": "1.1.0-beta.25358.3",
77
"commands": [
88
"darc"
99
]

.github/workflows/pr-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: PR Analysis
22
on:
33
pull_request_target:
4-
types: [opened, synchronize, labeled, unlabeled]
4+
types: [opened, synchronize, labeled, unlabeled, ready_for_review]
55
permissions:
66
contents: read
77
pull-requests: read

.vsts-ci.yml

Lines changed: 18 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,9 @@ extends:
6464
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
6565
parameters:
6666
containers:
67-
alpine322Amd64:
68-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.22-amd64
69-
centosStream9:
70-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9
71-
debian12Amd64:
72-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-gcc15-amd64
73-
fedora39:
74-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-39
75-
mariner20CrossArm:
76-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm
67+
azureLinux30Net10BuildAmd64:
68+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-build-amd64
69+
7770
sdl:
7871
sourceAnalysisPool:
7972
name: $(DncEngInternalBuildPool)
@@ -162,60 +155,44 @@ extends:
162155
timeoutInMinutes: 90
163156
linuxJobParameterSets:
164157
### OFFICIAL ###
165-
# Note: These builds are also portable like the Portable category, but that category uses containers, and doesn't publish zips and tarballs.
158+
# Note: These builds are also glibc like the glibc category, but that category uses containers, and doesn't publish zips and tarballs.
166159
- categoryName: Official
167160
publishArgument: $(_publishArgument)
168161
officialBuildProperties: $(_officialBuildProperties)
169-
osProperties: $(linuxOsPortableProperties)
162+
osProperties: $(linuxOsglibcProperties)
170163
runTests: false
171164
- categoryName: Official
172165
targetArchitecture: arm
173166
runtimeIdentifier: linux-arm
174167
publishArgument: $(_publishArgument)
175168
officialBuildProperties: $(_officialBuildProperties)
176-
osProperties: $(linuxOsPortableProperties)
169+
osProperties: $(linuxOsglibcProperties)
177170
runTests: false
178171
- categoryName: Official
179172
targetArchitecture: arm64
180173
runtimeIdentifier: linux-arm64
181174
publishArgument: $(_publishArgument)
182175
officialBuildProperties: $(_officialBuildProperties)
183-
osProperties: $(linuxOsPortableProperties)
184-
runTests: false
185-
### PORTABLE ###
186-
- categoryName: Portable
187-
# Do not publish zips and tarballs. The linux-x64 binaries are already published by Official.
188-
publishArgument: $(_publishArgument) /p:PublishBinariesAndBadge=false
189-
officialBuildProperties: $(_officialBuildProperties)
190-
osProperties: $(linuxOsPortableProperties) /p:BuildSdkDeb=true
191-
runTests: false
192-
- categoryName: Portable
193-
targetArchitecture: arm64
194-
runtimeIdentifier: linux-arm64
195-
# Do not publish zips and tarballs. The linux-arm64 binaries are already published by Official.
196-
publishArgument: $(_publishArgument) /p:PublishBinariesAndBadge=false
197-
officialBuildProperties: $(_officialBuildProperties)
198-
osProperties: $(linuxOsPortableProperties) /p:BuildSdkDeb=true
176+
osProperties: $(linuxOsglibcProperties)
199177
runTests: false
200-
- categoryName: Portable
201-
container: centosStream9
178+
### glibc ###
179+
- categoryName: glibc
202180
# Do not publish zips and tarballs. The linux-x64 binaries are already published by Official.
203181
publishArgument: $(_publishArgument) /p:PublishBinariesAndBadge=false
204182
officialBuildProperties: $(_officialBuildProperties)
205-
osProperties: $(linuxOsPortableProperties) /p:IsRPMBasedDistro=true
183+
osProperties: $(linuxOsglibcProperties) /p:BuildSdkDeb=true
206184
runTests: false
207-
- categoryName: Portable
208-
container: centosStream9
185+
- categoryName: glibc
209186
targetArchitecture: arm64
210187
runtimeIdentifier: linux-arm64
211188
# Do not publish zips and tarballs. The linux-arm64 binaries are already published by Official.
212189
publishArgument: $(_publishArgument) /p:PublishBinariesAndBadge=false
213190
officialBuildProperties: $(_officialBuildProperties)
214-
osProperties: $(linuxOsPortableProperties) /p:IsRPMBasedDistro=true
191+
osProperties: $(linuxOsglibcProperties) /p:BuildSdkDeb=true
215192
runTests: false
216-
### MUSL ###
217-
- categoryName: Musl
218-
container: alpine322Amd64
193+
### musl ###
194+
- categoryName: musl
195+
container: azureLinux30Net10BuildAmd64
219196
runtimeIdentifier: linux-musl-x64
220197
publishArgument: $(_publishArgument)
221198
officialBuildProperties: $(_officialBuildProperties)
@@ -224,15 +201,15 @@ extends:
224201
# SBOM generation is not supported for alpine.
225202
enableSbom: false
226203
runTests: false
227-
- categoryName: Musl
228-
container: mariner20CrossArm
204+
- categoryName: musl
205+
container: azureLinux30Net10BuildAmd64
229206
targetArchitecture: arm
230207
runtimeIdentifier: linux-musl-arm
231208
publishArgument: $(_publishArgument)
232209
officialBuildProperties: $(_officialBuildProperties)
233210
osProperties: /p:OSName=linux-musl
234211
runTests: false
235-
- categoryName: Musl
212+
- categoryName: musl
236213
targetArchitecture: arm64
237214
runtimeIdentifier: linux-musl-arm64
238215
publishArgument: $(_publishArgument)

.vsts-pr.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ parameters:
1818
- name: enableArm64Job
1919
displayName: Enables the ARM64 job
2020
type: boolean
21-
default: false
21+
default: true
2222

2323
variables:
2424
- template: /eng/pipelines/templates/variables/sdk-defaults.yml
@@ -27,16 +27,8 @@ variables:
2727

2828
resources:
2929
containers:
30-
- container: alpine322Amd64
31-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.22-amd64
32-
- container: centosStream9
33-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9
34-
- container: debian12Amd64
35-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-gcc15-amd64
36-
- container: fedora39
37-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-39
38-
- container: ubuntu2204DebPkg
39-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-debpkg
30+
- container: azureLinux30Net10BuildAmd64
31+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-build-amd64
4032

4133
stages:
4234
############### BUILD STAGE ###############

Directory.Build.props

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
<HostOSName Condition="'$(HostOSName)' == '' AND $([MSBuild]::IsOSPlatform('ILLUMOS'))">illumos</HostOSName>
2424
<HostOSName Condition="'$(HostOSName)' == '' AND '$(IsLinux)' == 'true'">linux</HostOSName>
2525

26+
<OSName Condition="'$(OSName)' == '' AND $(PortableTargetRid) != ''">$(PortableTargetRid.Substring(0, $(PortableTargetRid.LastIndexOf('-'))))</OSName>
2627
<OSName Condition="'$(OSName)' == '' AND $(TargetRid) != ''">$(TargetRid.Substring(0, $(TargetRid.LastIndexOf('-'))))</OSName>
2728
<OSName Condition="'$(OSName)' == ''">$(HostOSName)</OSName>
2829
</PropertyGroup>
@@ -95,7 +96,13 @@
9596
<MicrosoftNETCoreAppHostPackageVersion>$(MicrosoftNETCoreAppRefPackageVersion)</MicrosoftNETCoreAppHostPackageVersion>
9697
<MicrosoftNETCoreAppRuntimePackageVersion>$(MicrosoftNETCoreAppRefPackageVersion)</MicrosoftNETCoreAppRuntimePackageVersion>
9798
<MicrosoftAspNetCoreAppRuntimePackageVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</MicrosoftAspNetCoreAppRuntimePackageVersion>
98-
<MicrosoftWindowsDesktopAppRuntimePackageVersion>$(MicrosoftWindowsDesktopAppRefPackageVersion)</MicrosoftWindowsDesktopAppRuntimePackageVersion>
99+
<!-- These are set based on the runtime shared framework and internal versions. This is because windowsdesktop is not built in
100+
all VMR builds, but its version numbers are used to generate various bits of information. The VMR always aligns the version
101+
numbers of the shared frameworks. -->
102+
<MicrosoftWindowsDesktopAppRuntimePackageVersion>$(MicrosoftNETCoreAppRefPackageVersion)</MicrosoftWindowsDesktopAppRuntimePackageVersion>
103+
<MicrosoftWindowsDesktopAppRefPackageVersion>$(MicrosoftNETCoreAppRefPackageVersion)</MicrosoftWindowsDesktopAppRefPackageVersion>
104+
<MicrosoftNETSdkWindowsDesktopPackageVersion>$(MicrosoftNETCorePlatformsPackageVersion)</MicrosoftNETSdkWindowsDesktopPackageVersion>
105+
<MicrosoftWindowsDesktopAppInternalPackageVersion>$(MicrosoftNETCorePlatformsPackageVersion)</MicrosoftWindowsDesktopAppInternalPackageVersion>
99106

100107
<HostFxrVersion>$(MicrosoftNETCoreAppRuntimePackageVersion)</HostFxrVersion>
101108
<SharedHostVersion>$(MicrosoftNETCoreAppRuntimePackageVersion)</SharedHostVersion>

documentation/general/dotnet-run-file.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ Command `dotnet publish file.cs` is also supported for file-based programs.
9898
Note that file-based apps have implicitly set `PublishAot=true`, so publishing uses Native AOT (and building reports AOT warnings).
9999
To opt out, use `#:property PublishAot=false` directive in your `.cs` file.
100100

101+
Command `dotnet clean file.cs` can be used to clean build artifacts of the file-based program.
102+
101103
## Entry points
102104

103105
If a file is given to `dotnet run`, it has to be an *entry-point file*, otherwise an error is reported.
@@ -123,6 +125,10 @@ Similarly, implicit build files like `Directory.Build.props` or `Directory.Packa
123125
> [!CAUTION]
124126
> Multi-file support is postponed for .NET 11.
125127
> In .NET 10, only the single file passed as the command-line argument to `dotnet run` is part of the compilation.
128+
> Specifically, the virtual project has properties `EnableDefaultCompileItems=false` and `EnableDefaultEmbeddedResourceItems=false`
129+
> (which can be customized via `#:property` directives), and a `Compile` item for the entry point file.
130+
> During [conversion](#grow-up), any `Content`, `None`, `Compile`, and `EmbeddedResource` items that do not have metadata `ExcludeFromFileBasedAppConversion=true`
131+
> and that are files inside the entry point file's directory tree are copied to the converted directory.
126132
127133
### Nested files
128134

@@ -364,9 +370,8 @@ or as the first argument if it makes sense for them.
364370
We could also add `dotnet compile` command that would be the equivalent of `dotnet build` but for file-based programs
365371
(because "compiling" might make more sense for file-based programs than "building").
366372

367-
`dotnet clean` could be extended to support cleaning [the output directory](#build-outputs),
368-
e.g., via `dotnet clean --file-based-program <path-to-entry-point>`
369-
or `dotnet clean --all-file-based-programs`.
373+
`dotnet clean` could be extended to support cleaning all file-based app outputs,
374+
e.g., `dotnet clean --all-file-based-apps`.
370375

371376
Adding references via `dotnet package add`/`dotnet reference add` could be supported for file-based programs as well,
372377
i.e., the command would add a `#:package`/`#:project` directive to the top of a `.cs` file.

documentation/general/workloads/workload-diagnosis.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ _Installation rollback failed: Workload manifest dependency 'Microsoft.NET.Workl
2626

2727
1. Workload is not installed. Try running `dotnet workload restore`. If that does not work, try running `dotnet build -getItem:MissingWorkloadPack` to determine what workload packs are missing. Our workload detection logic could be wrong and you could need a different workload than we list. This call should provide the pack we need and file an issue in the SDK repo with this information.
2828
_NETSDK1147: To build this project, the following workloads must be installed:_
29-
2. You installed workloads previously but now your workload templates are missing (Aspire and MAUI templates are installed by the workloads). This could be because your workloads were installed correctly at some point in the past but are now out of sync.
29+
2. You installed workloads previously but now your workload templates are missing (MAUI templates are installed by the workloads). This could be because your workloads were installed correctly at some point in the past but are now out of sync.
3030
1. You installed a new band of the SDK. Workloads are installed per band so installing a new SDK could lead to your workloads not working. [Workload versions](https://github.com/dotnet/designs/pull/294) should improve that.
3131
2. You installed a different workload from the dotnet CLI. We've improved this a few times but it's still possible to install a different workload which updates your workload manifests without updating your workloads. Please file a bug if this happens to you.
3232
3. You install a new version of Visual Studio that doesn't have worklaods selected. Visual Studio should include all available workloads so make sure to select them in Visual Studio setup.

documentation/manpages/sdk/dotnet-restore.1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
. ftr VB CB
1515
. ftr VBI CBI
1616
.\}
17-
.TH "dotnet-restore" "1" "2025-06-13" "" ".NET Documentation"
17+
.TH "dotnet-restore" "1" "2025-06-30" "" ".NET Documentation"
1818
.hy
1919
.SH dotnet restore
2020
.PP
@@ -387,8 +387,8 @@ You can configure the level at which auditing will fail by setting the \f[V]<NuG
387387
Possible values are \f[V]low\f[R], \f[V]moderate\f[R], \f[V]high\f[R], and \f[V]critical\f[R].
388388
For example if you only want to see moderate, high, and critical advisories, you can set the property to \f[V]moderate\f[R].
389389
.PP
390-
Starting in .NET 9, NuGet audits both \f[I]direct\f[R] and \f[I]transitive\f[R] package references, by default.
391-
In .NET 8, only \f[I]direct\f[R] package references are audited.
390+
In .NET 8 and .NET 9, only \f[I]direct\f[R] package references are audited by default.
391+
Starting in .NET 10, NuGet audits both \f[I]direct\f[R] and \f[I]transitive\f[R] package references by default.
392392
You can change the mode by setting the \f[V]<NuGetAuditMode>\f[R] MSBuild property to \f[V]direct\f[R] or \f[V]all\f[R].
393393
.PP
394394
For more information, see Auditing package dependencies for security vulnerabilities.

documentation/manpages/sdk/dotnet-tool-update.1

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
. ftr VB CB
1515
. ftr VBI CBI
1616
.\}
17-
.TH "dotnet-tool-update" "1" "2025-06-13" "" ".NET Documentation"
17+
.TH "dotnet-tool-update" "1" "2025-06-30" "" ".NET Documentation"
1818
.hy
1919
.SH dotnet tool update
2020
.PP
@@ -27,23 +27,23 @@ dotnet-tool-update - Updates the specified .NET tool on your machine.
2727
.nf
2828
\f[C]
2929
dotnet tool update <PACKAGE_ID> -g|--global
30-
[--add-source <SOURCE>] [--allow-downgrade]
30+
[--add-source <SOURCE>] [--all] [--allow-downgrade]
3131
[--configfile <FILE>]
3232
[--disable-parallel] [--framework <FRAMEWORK>]
3333
[--ignore-failed-sources] [--interactive]
3434
[--no-cache] [--prerelease]
3535
[-v|--verbosity <LEVEL>] [--version <VERSION>]
3636

3737
dotnet tool update <PACKAGE_ID> --tool-path <PATH>
38-
[--add-source <SOURCE>] [--allow-downgrade]
38+
[--add-source <SOURCE>] [--all] [--allow-downgrade]
3939
[--configfile <FILE>]
4040
[--disable-parallel] [--framework <FRAMEWORK>]
4141
[--ignore-failed-sources] [--interactive]
4242
[--no-cache] [--prerelease]
4343
[-v|--verbosity <LEVEL>] [--version <VERSION>]
4444

4545
dotnet tool update <PACKAGE_ID> --local
46-
[--add-source <SOURCE>] [--allow-downgrade]
46+
[--add-source <SOURCE>] [--all] [--allow-downgrade]
4747
[--configfile <FILE>]
4848
[--disable-parallel] [--framework <FRAMEWORK>]
4949
[--ignore-failed-sources] [--interactive]
@@ -84,6 +84,12 @@ If the same package and version is in multiple feeds, the fastest feed wins.
8484
For more information, see What happens when a NuGet package is installed?.
8585
.RE
8686
.IP \[bu] 2
87+
\f[B]\f[VB]--all\f[B]\f[R]
88+
.RS 2
89+
.PP
90+
Update all tools.
91+
.RE
92+
.IP \[bu] 2
8793
\f[B]\f[VB]--allow-downgrade\f[B]\f[R]
8894
.RS 2
8995
.PP

documentation/project-docs/developer-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ In order to build and test the .NET Core Command-line Interface (CLI), you need
88
### For Windows
99

1010
1. git (available from the [Git Website](http://www.git-scm.com/)) on the PATH.
11-
2. MSVC, C++ CMake Tools, and C++ ATL through the Visual Studio Installer.
11+
2. MSVC, C++ CMake Tools, and C++ ATL through the Visual Studio Installer via the "Desktop development with C++" workload.
1212

1313
### For Linux
1414

0 commit comments

Comments
 (0)