Skip to content

Commit 548055e

Browse files
authored
Merge branch 'dotnet:main' into fix-producesresponsetype-minimal-api-again
2 parents 811b234 + aa0ae53 commit 548055e

File tree

575 files changed

+23040
-4010
lines changed

Some content is hidden

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

575 files changed

+23040
-4010
lines changed

.azure/pipelines/ci-public.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ pr:
1919
branches:
2020
include:
2121
- '*'
22+
paths:
23+
exclude:
24+
- .devcontainer/*
25+
- .github/*
26+
- .vscode/*
27+
- docs/*
28+
- '**/*.md'
29+
- LICENSE.TXT
30+
- THIRD-PARTY-NOTICES.TXT
2231

2332
parameters:
2433
# Choose whether to skip tests when running pipeline manually.
@@ -632,8 +641,8 @@ stages:
632641
platform:
633642
name: 'Managed'
634643
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-build-amd64'
635-
buildScript: './eng/build.sh --publish --no-build-repo-tasks $(_PublishArgs) $(_InternalRuntimeDownloadArgs)'
636-
skipPublishValidation: true
644+
buildScript: './eng/build.sh'
645+
buildArguments: '--source-build $(_InternalRuntimeDownloadArgs)'
637646
jobProperties:
638647
timeoutInMinutes: 120
639648
variables:

.azure/pipelines/ci.yml

Lines changed: 46 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,14 @@ variables:
7979
- name: WindowsArm64InstallersLogArgs
8080
value: /bl:artifacts/log/Release/Build.Installers.Arm64.binlog
8181
- name: _InternalRuntimeDownloadArgs
82-
value: -RuntimeSourceFeed https://dotnetbuilds.blob.core.windows.net/internal
82+
value: -RuntimeSourceFeed https://ci.dot.net/internal
8383
-RuntimeSourceFeedKey $(dotnetbuilds-internal-container-read-token-base64)
8484
/p:DotNetAssetRootAccessTokenSuffix='$(dotnetbuilds-internal-container-read-token-base64)'
8585
# The code signing doesn't use the aspnet build scripts, so the msbuild parameters have to be passed directly. This
8686
# is awkward but necessary because the eng/common/ build scripts don't add the msbuild properties automatically.
8787
- name: _InternalRuntimeDownloadCodeSignArgs
8888
value: $(_InternalRuntimeDownloadArgs)
89-
/p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal
89+
/p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal
9090
/p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64)
9191
- group: DotNet-HelixApi-Access
9292
- ${{ if notin(variables['Build.Reason'], 'PullRequest') }}:
@@ -173,6 +173,8 @@ extends:
173173
$(_BuildArgs)
174174
$(_InternalRuntimeDownloadArgs)
175175
$(Windows64LogArgs)
176+
env:
177+
MSBUILDUSESERVER: "1"
176178
displayName: Build x64
177179

178180
# Build the x86 shared framework
@@ -190,6 +192,8 @@ extends:
190192
$(_BuildArgs)
191193
$(_InternalRuntimeDownloadArgs)
192194
$(Windows86LogArgs)
195+
env:
196+
MSBUILDUSESERVER: "1"
193197
displayName: Build x86
194198

195199
# Build the arm64 shared framework
@@ -207,6 +211,8 @@ extends:
207211
$(_BuildArgs)
208212
$(_InternalRuntimeDownloadArgs)
209213
$(WindowsArm64LogArgs)
214+
env:
215+
MSBUILDUSESERVER: "1"
210216
displayName: Build ARM64
211217

212218
- script: .\src\SiteExtensions\build.cmd
@@ -218,6 +224,8 @@ extends:
218224
-noBuildNative
219225
$(_BuildArgs)
220226
$(_InternalRuntimeDownloadArgs)
227+
env:
228+
MSBUILDUSESERVER: "1"
221229
displayName: Build SiteExtension
222230

223231
# This runs code-signing on all packages, zips, and jar files as defined in build/CodeSign.targets. If
@@ -233,6 +241,8 @@ extends:
233241
/p:DotNetSignType=$(_SignType)
234242
$(_BuildArgs)
235243
$(WindowsSignLogArgs)
244+
env:
245+
MSBUILDUSESERVER: "1"
236246
displayName: Code sign packages
237247

238248
# Windows installers bundle x86/x64/arm64 assets
@@ -247,6 +257,8 @@ extends:
247257
$(_BuildArgs)
248258
$(_InternalRuntimeDownloadArgs)
249259
$(WindowsInstallersLogArgs)
260+
env:
261+
MSBUILDUSESERVER: "1"
250262
displayName: Build Installers
251263

252264
# Windows installers bundle and sharedfx msi for arm64
@@ -265,6 +277,8 @@ extends:
265277
$(_PublishArgs)
266278
$(_InternalRuntimeDownloadArgs)
267279
$(WindowsArm64InstallersLogArgs)
280+
env:
281+
MSBUILDUSESERVER: "1"
268282
displayName: Build ARM64 Installers
269283

270284
artifacts:
@@ -534,32 +548,33 @@ extends:
534548
parameters:
535549
inputName: Linux_musl_arm64
536550

551+
- template: .azure/pipelines/jobs/default-build.yml@self
552+
parameters:
553+
jobName: Windows_Test
554+
jobDisplayName: "Test: Windows Server x64"
555+
agentOs: Windows
556+
isAzDOTestingJob: true
557+
continueOnError: true
558+
# Just uploading artifacts/logs/ files can take 15 minutes. Doubling the cancel timeout for this job.
559+
cancelTimeoutInMinutes: 30
560+
buildArgs: -all -pack -test -binaryLog /p:SkipHelixReadyTests=true /p:SkipIISNewHandlerTests=true /p:SkipIISTests=true
561+
/p:SkipIISExpressTests=true /p:SkipIISNewShimTests=true /p:RunBlazorPlaywrightTemplateTests=true /p:DoNotCleanUpTemplates=true
562+
$(_InternalRuntimeDownloadArgs)
563+
beforeBuild:
564+
- powershell: "& ./src/Servers/IIS/tools/UpdateIISExpressCertificate.ps1; & ./src/Servers/IIS/tools/update_schema.ps1"
565+
displayName: Setup IISExpress test certificates and schema
566+
artifacts:
567+
- name: Windows_Test_Logs_Attempt_$(System.JobAttempt)
568+
path: artifacts/log/
569+
publishOnError: true
570+
includeForks: true
571+
- name: Windows_Test_Results_Attempt_$(System.JobAttempt)
572+
path: artifacts/TestResults/
573+
publishOnError: true
574+
includeForks: true
575+
537576
- ${{ if and(ne(parameters.skipTests, 'true'), in(variables['Build.Reason'], 'PullRequest', 'Manual')) }}:
538577
# Test jobs
539-
- template: .azure/pipelines/jobs/default-build.yml@self
540-
parameters:
541-
jobName: Windows_Test
542-
jobDisplayName: "Test: Windows Server x64"
543-
agentOs: Windows
544-
isAzDOTestingJob: true
545-
# Just uploading artifacts/logs/ files can take 15 minutes. Doubling the cancel timeout for this job.
546-
cancelTimeoutInMinutes: 30
547-
buildArgs: -all -pack -test -binaryLog /p:SkipHelixReadyTests=true /p:SkipIISNewHandlerTests=true /p:SkipIISTests=true
548-
/p:SkipIISExpressTests=true /p:SkipIISNewShimTests=true /p:RunTemplateTests=false /p:RunBlazorPlaywrightTemplateTests=true
549-
$(_InternalRuntimeDownloadArgs)
550-
beforeBuild:
551-
- powershell: "& ./src/Servers/IIS/tools/UpdateIISExpressCertificate.ps1; & ./src/Servers/IIS/tools/update_schema.ps1"
552-
displayName: Setup IISExpress test certificates and schema
553-
artifacts:
554-
- name: Windows_Test_Logs_Attempt_$(System.JobAttempt)
555-
path: artifacts/log/
556-
publishOnError: true
557-
includeForks: true
558-
- name: Windows_Test_Results_Attempt_$(System.JobAttempt)
559-
path: artifacts/TestResults/
560-
publishOnError: true
561-
includeForks: true
562-
563578
- template: .azure/pipelines/jobs/default-build.yml@self
564579
parameters:
565580
jobName: MacOS_Test
@@ -615,6 +630,8 @@ extends:
615630
# Build the shared framework
616631
- script: ./eng/build.cmd -ci -prepareMachine -nativeToolsOnMachine -nobl -all -pack -arch x64
617632
/p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log $(_InternalRuntimeDownloadArgs)
633+
env:
634+
MSBUILDUSESERVER: "1"
618635
displayName: Build shared fx
619636
# -noBuildRepoTasks -noBuildNative -noBuild to avoid repeating work done in the previous step.
620637
- script: ./eng/build.cmd -ci -prepareMachine -nativeToolsOnMachine -nobl -all -noBuildRepoTasks -noBuildNative -noBuild -test
@@ -668,16 +685,15 @@ extends:
668685
path: artifacts/log/
669686
publishOnError: true
670687
includeForks: true
671-
672688
# Source build
673689
- template: /eng/common/templates-official/job/source-build.yml@self
674690
parameters:
675691
enableInternalSources: true
676692
platform:
677693
name: 'Managed'
678-
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8'
679-
buildScript: './eng/build.sh --publish --no-build-repo-tasks $(_PublishArgs) $(_InternalRuntimeDownloadArgs)'
680-
skipPublishValidation: true
694+
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream-10-amd64'
695+
buildScript: './eng/build.sh'
696+
buildArguments: '--source-build $(_InternalRuntimeDownloadArgs)'
681697
jobProperties:
682698
timeoutInMinutes: 120
683699
variables:

.azure/pipelines/components-e2e-tests.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ pr:
1717
branches:
1818
include:
1919
- '*'
20+
paths:
21+
exclude:
22+
- .devcontainer/*
23+
- .github/*
24+
- .vscode/*
25+
- docs/*
26+
- '**/*.md'
27+
- LICENSE.TXT
28+
- THIRD-PARTY-NOTICES.TXT
2029

2130
variables:
2231
- name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE

.azure/pipelines/jobs/default-build.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ parameters:
6262
isAzDOTestingJob: false
6363
enablePublishTestResults: ''
6464
enableSbom: true
65+
continueOnError: false
6566
variables: []
6667

6768
configuration: 'Release'
@@ -128,6 +129,8 @@ jobs:
128129
- TeamName: AspNetCore
129130
- ${{ if ne(parameters.codeSign, true) }}:
130131
- _SignType: ''
132+
- ${{ if ne(parameters.isAzDOTestingJob, true) }}:
133+
- MSBUILDUSESERVER: "1"
131134
- LC_ALL: 'en_US.UTF-8'
132135
- LANG: 'en_US.UTF-8'
133136
- LANGUAGE: 'en_US.UTF-8'
@@ -207,13 +210,15 @@ jobs:
207210
- script: $(BuildDirectory)\build.cmd -ci -prepareMachine -nativeToolsOnMachine -Configuration $(BuildConfiguration) $(BuildScriptArgs)
208211
/p:DotNetSignType=$(_SignType)
209212
displayName: Run build.cmd
213+
continueOnError: ${{ parameters.continueOnError }}
210214
env:
211215
COMPlus_DbgEnableMiniDump: 1
212216
COMPlus_DbgMiniDumpName: "$(System.DefaultWorkingDirectory)/dotnet-%d.%t.core"
213217
DotNetBuildsInternalReadSasToken: $(dotnetbuilds-internal-container-read-token)
214218
- ${{ if ne(parameters.agentOs, 'Windows') }}:
215219
- script: $(BuildDirectory)/build.sh --ci --configuration $(BuildConfiguration) $(BuildScriptArgs)
216220
displayName: Run build.sh
221+
continueOnError: ${{ parameters.continueOnError }}
217222
env:
218223
COMPlus_DbgEnableMiniDump: 1
219224
COMPlus_DbgMiniDumpName: "$(System.DefaultWorkingDirectory)/dotnet-%d.%t.core"
@@ -345,6 +350,8 @@ jobs:
345350
- LANGUAGE: 'en_US.UTF-8'
346351
- ${{ if ne(parameters.codeSign, true) }}:
347352
- _SignType: ''
353+
- ${{ if ne(parameters.isAzDOTestingJob, true) }}:
354+
- MSBUILDUSESERVER: "1"
348355
- ${{ else }}:
349356
- ${{ if notin(variables['Build.Reason'], 'PullRequest') }}:
350357
- _SignType: real
@@ -443,13 +450,15 @@ jobs:
443450
- script: $(BuildDirectory)\build.cmd -ci -prepareMachine -nativeToolsOnMachine -Configuration $(BuildConfiguration) $(BuildScriptArgs)
444451
/p:DotNetSignType=$(_SignType)
445452
displayName: Run build.cmd
453+
continueOnError: ${{ parameters.continueOnError }}
446454
env:
447455
COMPlus_DbgEnableMiniDump: 1
448456
COMPlus_DbgMiniDumpName: "$(System.DefaultWorkingDirectory)/dotnet-%d.%t.core"
449457
DotNetBuildsInternalReadSasToken: $(dotnetbuilds-internal-container-read-token)
450458
- ${{ if ne(parameters.agentOs, 'Windows') }}:
451459
- script: $(BuildDirectory)/build.sh --ci --configuration $(BuildConfiguration) $(BuildScriptArgs)
452460
displayName: Run build.sh
461+
continueOnError: ${{ parameters.continueOnError }}
453462
env:
454463
COMPlus_DbgEnableMiniDump: 1
455464
COMPlus_DbgMiniDumpName: "$(System.DefaultWorkingDirectory)/dotnet-%d.%t.core"

.editorconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,13 @@ dotnet_diagnostic.IDE0161.severity = silent
464464
# IDE0005: Remove unused usings. Ignore for shared src files since imports for those depend on the projects in which they are included.
465465
dotnet_diagnostic.IDE0005.severity = silent
466466

467+
[{**/microsoft.dotnet.hotreload.agent*/**.cs}]
468+
# IDE0005: Remove unused usings. Ignore for shared src files coming from nuget package.
469+
dotnet_diagnostic.IDE0005.severity = silent
470+
# IDE0073: A source file is missing a required header. Ignore for shared src files coming from nuget package.
471+
dotnet_diagnostic.IDE0073.severity = silent
472+
473+
467474
# Verify settings
468475
[*.{received,verified}.{txt,xml,json}]
469476
charset = "utf-8-bom"

.github/CODEOWNERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
/eng/ @dotnet/aspnet-build @wtgodbe
1515
/eng/Versions.props @dotnet/aspnet-build @wtgodbe
1616
/eng/Version.Details.xml @dotnet/aspnet-build @wtgodbe
17-
/eng/SourceBuild* @dotnet/source-build
1817
/src/Caching/ @captainsafia @halter73 @mgravell
1918
/src/Components/ @dotnet/aspnet-blazor-eng
2019
/src/DefaultBuilder/ @halter73

.github/copilot-instructions.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
## General
2+
3+
* Make only high confidence suggestions when reviewing code changes.
4+
* Always use the latest version C#, currently C# 13 features.
5+
* Never change global.json unless explicitly asked to.
6+
* Never change package.json or package-lock.json files unless explicitly asked to.
7+
* Never change NuGet.config files unless explicitly asked to.
8+
9+
## Formatting
10+
11+
* Apply code-formatting style defined in `.editorconfig`.
12+
* Prefer file-scoped namespace declarations and single-line using directives.
13+
* Insert a newline before the opening curly brace of any code block (e.g., after `if`, `for`, `while`, `foreach`, `using`, `try`, etc.).
14+
* Ensure that the final return statement of a method is on its own line.
15+
* Use pattern matching and switch expressions wherever possible.
16+
* Use `nameof` instead of string literals when referring to member names.
17+
* Ensure that XML doc comments are created for any public APIs. When applicable, include `<example>` and `<code>` documentation in the comments.
18+
19+
### Nullable Reference Types
20+
21+
* Declare variables non-nullable, and check for `null` at entry points.
22+
* Always use `is null` or `is not null` instead of `== null` or `!= null`.
23+
* Trust the C# null annotations and don't add null checks when the type system says a value cannot be null.
24+
25+
### Testing
26+
27+
* We use xUnit SDK v3 for tests.
28+
* Do not emit "Act", "Arrange" or "Assert" comments.
29+
* Use Moq for mocking in tests.
30+
* Copy existing style in nearby files for test method names and capitalization.
31+
32+
## Running tests
33+
34+
* To build and run tests in the repo, use the `build.sh` script that is located in each subdirectory within the `src` folder. For example, to run the build with tests in the `src/Http` directory, run `./src/Http/build.sh -test`.

0 commit comments

Comments
 (0)