Skip to content

Commit 8094fb0

Browse files
authored
[automated] Merge branch 'release/10.0.1xx' => 'release/10.0.2xx' (#51187)
2 parents 51297ba + 20b1f64 commit 8094fb0

File tree

211 files changed

+4618
-1543
lines changed

Some content is hidden

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

211 files changed

+4618
-1543
lines changed

.github/copilot-instructions.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ Testing:
1616
- Examples:
1717
- `dotnet test test/dotnet.Tests/dotnet.Tests.csproj --filter "Name~ItShowsTheAppropriateMessageToTheUser"`
1818
- `dotnet exec artifacts/bin/redist/Debug/dotnet.Tests.dll -method "*ItShowsTheAppropriateMessageToTheUser*"`
19+
- To test CLI command changes:
20+
- Build the redist SDK: `./build.sh` from repo root
21+
- Create a dogfood environment: `source eng/dogfood.sh`
22+
- Test commands in the dogfood shell (e.g., `dnx --help`, `dotnet tool install --help`)
23+
- The dogfood script sets up PATH and environment to use the newly built SDK
1924

2025
Output Considerations:
2126
- When considering how output should look, solicit advice from baronfel.

.vsts-ci.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ extends:
102102
oneESCompat:
103103
templateFolderName: templates-official
104104
publishTaskPrefix: 1ES.
105+
populateInternalRuntimeVariables: true
105106
runtimeSourceProperties: /p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64)
106107
locBranch: release/10.0.1xx
107108
# WORKAROUND: BinSkim requires the folder exist prior to scanning.
@@ -141,6 +142,14 @@ extends:
141142
_SignType: real
142143
dependsOn: Official_windows_x64
143144
downloadManifestMsiPackages: true
145+
### TestTemplatesCG ###
146+
# Note: This job is only used to allow the test templates to be built locally on the agent as opposed to Helix.
147+
# The tests acquire the templates' PackageReferences from NuGet, which allows them to be scanned by CG (component governance).
148+
# CG is only ran internally, so this job makes sense to only run alongside of the official jobs.
149+
- categoryName: TestTemplatesCG
150+
testProjects: $(Build.SourcesDirectory)/test/dotnet-new.IntegrationTests/dotnet-new.IntegrationTests.csproj
151+
testRunnerAdditionalArguments: -class Microsoft.DotNet.Cli.New.IntegrationTests.DotnetNewTestTemplatesTests
152+
publishXunitResults: true
144153

145154
############### LINUX ###############
146155
- template: /eng/pipelines/templates/jobs/sdk-job-matrix.yml@self
@@ -153,6 +162,7 @@ extends:
153162
oneESCompat:
154163
templateFolderName: templates-official
155164
publishTaskPrefix: 1ES.
165+
populateInternalRuntimeVariables: true
156166
runtimeSourceProperties: /p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64)
157167
${{ if and(eq(parameters.runTestBuild, false), ne(variables['Build.Reason'], 'PullRequest')) }}:
158168
timeoutInMinutes: 90
@@ -235,6 +245,7 @@ extends:
235245
oneESCompat:
236246
templateFolderName: templates-official
237247
publishTaskPrefix: 1ES.
248+
populateInternalRuntimeVariables: true
238249
runtimeSourceProperties: /p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64)
239250
${{ if and(eq(parameters.runTestBuild, false), ne(variables['Build.Reason'], 'PullRequest')) }}:
240251
timeoutInMinutes: 90
@@ -260,6 +271,8 @@ extends:
260271
vmImage: macOS-latest
261272
os: macOS
262273
helixTargetQueue: osx.13.arm64
274+
populateInternalRuntimeVariables: true
275+
runtimeSourceProperties: /p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64)
263276
macOSJobParameterSets:
264277
- categoryName: TestBuild
265278
targetArchitecture: arm64
@@ -270,7 +283,9 @@ extends:
270283
- template: /eng/dotnet-format/dotnet-format-integration.yml@self
271284
parameters:
272285
oneESCompat:
286+
templateFolderName: templates-official
273287
publishTaskPrefix: 1ES.
288+
populateInternalRuntimeVariables: true
274289
runtimeSourceProperties: /p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64)
275290

276291
############### PUBLISH STAGE ###############

Directory.Build.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
<ItemGroup Condition="$(MicrosoftAspNetCoreAppRefPackageVersion.StartsWith('$(_TargetFrameworkVersionWithoutV)'))">
7474
<KnownFrameworkReference Update="Microsoft.AspNetCore.App">
7575
<LatestRuntimeFrameworkVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</LatestRuntimeFrameworkVersion>
76-
<RuntimePackRuntimeIdentifiers>${SupportedRuntimeIdentifiers}</RuntimePackRuntimeIdentifiers>
76+
<RuntimePackRuntimeIdentifiers>$(SupportedRuntimeIdentifiers)</RuntimePackRuntimeIdentifiers>
7777
<TargetingPackVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</TargetingPackVersion>
7878
<DefaultRuntimeFrameworkVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</DefaultRuntimeFrameworkVersion>
7979
</KnownFrameworkReference>

Directory.Packages.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
<NoWarn>$(NoWarn);NU1507</NoWarn>
66
</PropertyGroup>
77
<ItemGroup>
8-
<PackageVersion Include="Basic.CompilerLog.Util" Version="0.9.9" />
8+
<PackageVersion Include="Basic.CompilerLog.Util" Version="0.9.18" />
99
<PackageVersion Include="AwesomeAssertions" Version="$(AwesomeAssertionsVersion)" />
1010
<PackageVersion Include="BenchmarkDotNet" Version="$(BenchmarkDotNetPackageVersion)" />
1111
<PackageVersion Include="AwesomeAssertions.Json" Version="$(AwesomeAssertionsJsonVersion)" />
12-
<PackageVersion Include="MessagePack" Version="2.5.187" />
12+
<PackageVersion Include="MessagePack" Version="3.1.4" />
1313
<PackageVersion Include="MicroBuild.Plugins.SwixBuild.Dotnet" Version="1.1.87-gba258badda" />
1414
<PackageVersion Include="Microsoft.ApplicationInsights" Version="$(MicrosoftApplicationInsightsPackageVersion)" />
1515
<PackageVersion Include="Microsoft.AspNetCore.DeveloperCertificates.XPlat" Version="$(MicrosoftAspNetCoreDeveloperCertificatesXPlatPackageVersion)" />
@@ -94,7 +94,7 @@
9494
<PackageVersion Include="Microsoft.WixToolset.Heat" Version="$(MicrosoftWixToolsetSdkVersion)" />
9595
<PackageVersion Include="Microsoft.WixToolset.Util.wixext" Version="$(MicrosoftWixToolsetSdkVersion)" />
9696
<PackageVersion Include="Microsoft.WixToolset.UI.wixext" Version="$(MicrosoftWixToolsetSdkVersion)" />
97-
<PackageVersion Include="MSBuild.StructuredLogger" Version="2.2.386" />
97+
<PackageVersion Include="MSBuild.StructuredLogger" Version="2.3.45" />
9898
<PackageVersion Include="Moq" Version="$(MoqPackageVersion)" />
9999
<PackageVersion Include="NETStandard.Library.NETFramework" Version="$(NETStandardLibraryNETFrameworkVersion)" />
100100
<PackageVersion Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />

NuGet.config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
<packageSources>
44
<clear />
55
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
6+
<!-- Begin: Package sources from microsoft-testfx -->
7+
<!-- End: Package sources from microsoft-testfx -->
68
<!-- Begin: Package sources from dotnet-aspire -->
79
<!-- End: Package sources from dotnet-aspire -->
810
<!-- Begin: Package sources from dotnet-runtime -->

build/RunTestTemplateTests.ps1

Lines changed: 0 additions & 46 deletions
This file was deleted.

documentation/general/analyzer-redirecting.md

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,36 @@ Targeting an SDK (and hence also loading analyzers) with newer major version in
2828

2929
- Note that when `IAnalyzerAssemblyRedirector` is involved, Roslyn is free to not use shadow copy loading and instead load the DLLs directly.
3030

31+
- It is possible to opt out of analyzer redirecting by setting environment variable `DOTNET_ANALYZER_REDIRECTING=0`.
32+
That is an unsupported scenario though and compiler version mismatch errors will likely occur.
33+
3134
## Details
3235

3336
The VSIX contains some analyzers, for example:
3437

3538
```
36-
AspNetCoreAnalyzers\9.0.0-preview.5.24306.11\analyzers\dotnet\cs\Microsoft.AspNetCore.App.Analyzers.dll
37-
NetCoreAnalyzers\9.0.0-preview.5.24306.7\analyzers\dotnet\cs\System.Text.RegularExpressions.Generator.dll
38-
WindowsDesktopAnalyzers\9.0.0-preview.5.24306.8\analyzers\dotnet\System.Windows.Forms.Analyzers.dll
39-
SDKAnalyzers\9.0.100-dev\Sdks\Microsoft.NET.Sdk\analyzers\Microsoft.CodeAnalysis.NetAnalyzers.dll
40-
WebSDKAnalyzers\9.0.100-dev\Sdks\Microsoft.NET.Sdk.Web\analyzers\cs\Microsoft.AspNetCore.Analyzers.dll
39+
AspNetCoreAnalyzers\analyzers\dotnet\cs\Microsoft.AspNetCore.App.Analyzers.dll
40+
NetCoreAnalyzers\analyzers\dotnet\cs\System.Text.RegularExpressions.Generator.dll
41+
WindowsDesktopAnalyzers\analyzers\dotnet\System.Windows.Forms.Analyzers.dll
42+
SDKAnalyzers\Sdks\Microsoft.NET.Sdk\analyzers\Microsoft.CodeAnalysis.NetAnalyzers.dll
43+
WebSDKAnalyzers\Sdks\Microsoft.NET.Sdk.Web\analyzers\cs\Microsoft.AspNetCore.Analyzers.dll
44+
```
45+
46+
And metadata at `metadata.json`:
47+
48+
```json
49+
{
50+
"AspNetCoreAnalyzers": "9.0.0-preview.5.24306.11",
51+
"NetCoreAnalyzers": "9.0.0-preview.5.24306.7",
52+
"WindowsDesktopAnalyzers": "9.0.0-preview.5.24306.8",
53+
"SDKAnalyzers": "9.0.100-dev",
54+
"WebSDKAnalyzers": "9.0.100-dev",
55+
}
4156
```
4257

4358
Given an analyzer assembly load going through our `IAnalyzerAssemblyRedirector`,
4459
we will redirect it if the original path of the assembly being loaded matches the path of a VSIX-deployed analyzer -
45-
only segments of these paths starting after the version segment are compared,
60+
only relevant segments (see example below) of these paths are compared,
4661
plus the major and minor component of the versions must match.
4762

4863
For example, the analyzer
@@ -54,15 +69,20 @@ C:\Program Files\dotnet\sdk\9.0.100-preview.5.24307.3\Sdks\Microsoft.NET.Sdk\ana
5469
will be redirected to
5570

5671
```
57-
{VSIX}\SDKAnalyzers\9.0.100-dev\Sdks\Microsoft.NET.Sdk\analyzers\Microsoft.CodeAnalysis.NetAnalyzers.dll
72+
{VSIX}\SDKAnalyzers\Sdks\Microsoft.NET.Sdk\analyzers\Microsoft.CodeAnalysis.NetAnalyzers.dll
5873
```
5974

60-
because
75+
where `metadata.json` has `"SDKAnalyzers": "9.0.100-dev"`, because
6176
1. the suffix `Sdks\Microsoft.NET.Sdk\analyzers\Microsoft.CodeAnalysis.NetAnalyzers.dll` matches, and
6277
2. the version `9.0.100-preview.5.24307.3` has the same major and minor component (`9.0`) as the version `9.0.100-dev`
6378
(both versions are read from the paths, not DLL metadata).
6479

6580
Analyzers that cannot be matched will continue to be loaded from the SDK
6681
(and will fail to load if they reference Roslyn that is newer than is in VS).
6782

83+
### Implementation
84+
85+
Analyzer DLLs are contained in transport package `VS.Redist.Common.Net.Core.SDK.RuntimeAnalyzers`.
86+
The redirecting logic lives in "system" VS extension `Microsoft.Net.Sdk.AnalyzerRedirecting`.
87+
6888
[torn-sdk]: https://github.com/dotnet/sdk/issues/42087

documentation/manpages/sdk/dotnet-build.1

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@
1414
. ftr VB CB
1515
. ftr VBI CBI
1616
.\}
17-
.TH "dotnet-build" "1" "2025-06-13" "" ".NET Documentation"
17+
.TH "dotnet-build" "1" "2025-09-30" "" ".NET Documentation"
1818
.hy
1919
.SH dotnet build
2020
.PP
21-
\f[B]This article applies to:\f[R] \[u2714]\[uFE0F] .NET Core 3.1 SDK and later versions
21+
\f[B]This article applies to:\f[R] \[u2714]\[uFE0F] .NET 6 and later versions
2222
.SH NAME
2323
.PP
24-
dotnet-build - Builds a project and all of its dependencies.
24+
dotnet-build - Builds a project, solution, or file-based app and all of its dependencies.
2525
.SH SYNOPSIS
2626
.IP
2727
.nf
2828
\f[C]
29-
dotnet build [<PROJECT>|<SOLUTION>] [-a|--arch <ARCHITECTURE>]
29+
dotnet build [<PROJECT>|<SOLUTION>|<FILE>] [-a|--arch <ARCHITECTURE>]
3030
[--artifacts-path <ARTIFACTS_DIR>]
3131
[-c|--configuration <CONFIGURATION>] [-f|--framework <FRAMEWORK>]
3232
[--disable-build-servers]
@@ -35,7 +35,7 @@ dotnet build [<PROJECT>|<SOLUTION>] [-a|--arch <ARCHITECTURE>]
3535
[-o|--output <OUTPUT_DIRECTORY>]
3636
[-p|--property:<PROPERTYNAME>=<VALUE>]
3737
[-r|--runtime <RUNTIME_IDENTIFIER>]
38-
[--self-contained [true|false]] [--source <SOURCE>]
38+
[-sc|--self-contained [true|false]] [--source <SOURCE>]
3939
[--tl:[auto|on|off]] [--use-current-runtime, --ucr [true|false]]
4040
[-v|--verbosity <LEVEL>] [--version-suffix <VERSION_SUFFIX>]
4141

@@ -44,11 +44,11 @@ dotnet build -h|--help
4444
.fi
4545
.SH DESCRIPTION
4646
.PP
47-
The \f[V]dotnet build\f[R] command builds the project and its dependencies into a set of binaries.
47+
The \f[V]dotnet build\f[R] command builds the project, solution, or file-based app and its dependencies into a set of binaries.
4848
The binaries include the project\[cq]s code in Intermediate Language (IL) files with a \f[I].dll\f[R] extension.
4949
Depending on the project type and settings, other files may be included, such as:
5050
.IP \[bu] 2
51-
An executable that can be used to run the application, if the project type is an executable targeting .NET Core 3.0 or later.
51+
An executable that can be used to run the application.
5252
.IP \[bu] 2
5353
Symbol files used for debugging with a \f[I].pdb\f[R] extension.
5454
.IP \[bu] 2
@@ -58,12 +58,6 @@ A \f[I].runtimeconfig.json\f[R] file, which specifies the shared runtime and its
5858
.IP \[bu] 2
5959
Other libraries that the project depends on (via project references or NuGet package references).
6060
.PP
61-
For executable projects targeting versions earlier than .NET Core 3.0, library dependencies from NuGet are typically NOT copied to the output folder.
62-
They\[cq]re resolved from the NuGet global packages folder at run time.
63-
With that in mind, the product of \f[V]dotnet build\f[R] isn\[cq]t ready to be transferred to another machine to run.
64-
To create a version of the application that can be deployed, you need to publish it (for example, with the dotnet publish command).
65-
For more information, see .NET Application Deployment.
66-
.PP
6761
For executable projects targeting .NET Core 3.0 and later, library dependencies are copied to the output folder.
6862
This means that if there isn\[cq]t any other publish-specific logic (such as Web projects have), the build output should be deployable.
6963
.SS Implicit restore
@@ -98,7 +92,8 @@ To produce a library, omit the \f[V]<OutputType>\f[R] property or change its val
9892
The IL DLL for a library doesn\[cq]t contain entry points and can\[cq]t be executed.
9993
.SS MSBuild
10094
.PP
101-
\f[V]dotnet build\f[R] uses MSBuild to build the project, so it supports both parallel and incremental builds.
95+
\f[V]dotnet build\f[R] uses MSBuild to build the project, solution, or file-based app.
96+
It supports both parallel and incremental builds.
10297
For more information, see Incremental Builds.
10398
.PP
10499
In addition to its options, the \f[V]dotnet build\f[R] command accepts MSBuild options, such as \f[V]-p\f[R] for setting properties or \f[V]-l\f[R] to define a logger.
@@ -117,10 +112,19 @@ If the download is still running when this command finishes, the download is sto
117112
For more information, see Advertising manifests.
118113
.SH ARGUMENTS
119114
.PP
120-
\f[V]PROJECT | SOLUTION\f[R]
115+
\f[V]PROJECT | SOLUTION | FILE\f[R]
121116
.PP
122-
The project or solution file to build.
123-
If a project or solution file isn\[cq]t specified, MSBuild searches the current working directory for a file that has a file extension that ends in either \f[I]proj\f[R] or \f[I]sln\f[R] and uses that file.
117+
The project or solution or C# (file-based app) file to operate on.
118+
If a file isn\[cq]t specified, MSBuild searches the current directory for a project or solution.
119+
.IP \[bu] 2
120+
\f[V]PROJECT\f[R] is the path and filename of a C#, F#, or Visual Basic project file, or the path to a directory that contains a C#, F#, or Visual Basic project file.
121+
.IP \[bu] 2
122+
\f[V]SOLUTION\f[R] is the path and filename of a solution file (\f[I].sln\f[R] or \f[I].slnx\f[R] extension), or the path to a directory that contains a solution file.
123+
.IP \[bu] 2
124+
\f[V]FILE\f[R] is an argument added in .NET 10.
125+
The path and filename of a file-based app.
126+
File-based apps are contained within a single file that is built and run without a corresponding project (\f[I].csproj\f[R]) file.
127+
For more information, see Build file-based C# apps.
124128
.SH OPTIONS
125129
.IP \[bu] 2
126130
\f[B]\f[VB]-a|--arch <ARCHITECTURE>\f[B]\f[R]
@@ -285,13 +289,13 @@ The URI of the NuGet package source to use during the restore operation.
285289
\f[B]\f[VB]--tl:[auto|on|off]\f[B]\f[R]
286290
.RS 2
287291
.PP
288-
Specifies whether the \f[I]terminal logger\f[R] should be used for the build output.
292+
Specifies whether \f[I]Terminal Logger\f[R] should be used for the build output.
289293
The default is \f[V]auto\f[R], which first verifies the environment before enabling terminal logging.
290294
The environment check verifies that the terminal is capable of using modern output features and isn\[cq]t using a redirected standard output before enabling the new logger.
291295
\f[V]on\f[R] skips the environment check and enables terminal logging.
292296
\f[V]off\f[R] skips the environment check and uses the default console logger.
293297
.PP
294-
The terminal logger shows you the restore phase followed by the build phase.
298+
Terminal Logger shows you the restore phase followed by the build phase.
295299
During each phase, the currently building projects appear at the bottom of the terminal.
296300
Each project that\[cq]s building outputs both the MSBuild target currently being built and the amount of time spent on that target.
297301
You can search this information to learn more about the build.
@@ -348,6 +352,18 @@ dotnet build
348352
.fi
349353
.RE
350354
.IP \[bu] 2
355+
Build a file-based app:
356+
.RS 2
357+
.IP
358+
.nf
359+
\f[C]
360+
dotnet build MyProject.cs
361+
\f[R]
362+
.fi
363+
.PP
364+
File-based app support was added in .NET SDK 10.0.100.
365+
.RE
366+
.IP \[bu] 2
351367
Build a project and its dependencies using Release configuration:
352368
.RS 2
353369
.IP

0 commit comments

Comments
 (0)