Skip to content

Commit 19fc1a8

Browse files
Merge branch 'main' of github-personal:matthetherington/aspnetcore into quickgrid-public-close-column-options
2 parents 653a185 + 843f7b0 commit 19fc1a8

File tree

394 files changed

+240390
-80984
lines changed

Some content is hidden

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

394 files changed

+240390
-80984
lines changed

.github/policies/resourceManagement.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -384,12 +384,12 @@ configuration:
384384
- isAction:
385385
action: Closed
386386
- targetsBranch:
387-
branch: release/9.0-rc1
387+
branch: release/9.0-rc2
388388
then:
389389
- removeMilestone
390390
- addMilestone:
391-
milestone: 9.0-rc1
392-
description: '[Milestone Assignments] Assign Milestone to PRs merged to release/9.0-rc1 branch'
391+
milestone: 9.0-rc2
392+
description: '[Milestone Assignments] Assign Milestone to PRs merged to release/9.0-rc2 branch'
393393
- if:
394394
- payloadType: Pull_Request
395395
- isAction:
@@ -399,7 +399,7 @@ configuration:
399399
then:
400400
- removeMilestone
401401
- addMilestone:
402-
milestone: 9.0-rc2
402+
milestone: 9.0.0
403403
description: '[Milestone Assignments] Assign Milestone to PRs merged to release/9.0 branch'
404404
- if:
405405
- payloadType: Issues

eng/Version.Details.xml

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

eng/Versions.props

Lines changed: 88 additions & 88 deletions
Large diffs are not rendered by default.
Lines changed: 5 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
parameters:
22
runAsPublic: false
3-
sourceIndexUploadPackageVersion: 2.0.0-20240522.1
4-
sourceIndexProcessBinlogPackageVersion: 1.0.1-20240522.1
5-
sourceIndexPackageSource: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json
63
sourceIndexBuildCommand: powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "eng/common/build.ps1 -restore -build -binarylog -ci"
74
preSteps: []
85
binlogPath: artifacts/log/Debug/Build.binlog
@@ -16,12 +13,6 @@ jobs:
1613
dependsOn: ${{ parameters.dependsOn }}
1714
condition: ${{ parameters.condition }}
1815
variables:
19-
- name: SourceIndexUploadPackageVersion
20-
value: ${{ parameters.sourceIndexUploadPackageVersion }}
21-
- name: SourceIndexProcessBinlogPackageVersion
22-
value: ${{ parameters.sourceIndexProcessBinlogPackageVersion }}
23-
- name: SourceIndexPackageSource
24-
value: ${{ parameters.sourceIndexPackageSource }}
2516
- name: BinlogPath
2617
value: ${{ parameters.binlogPath }}
2718
- template: /eng/common/core-templates/variables/pool-providers.yml
@@ -34,48 +25,20 @@ jobs:
3425
pool:
3526
${{ if eq(variables['System.TeamProject'], 'public') }}:
3627
name: $(DncEngPublicBuildPool)
37-
image: 1es-windows-2022-open
38-
os: windows
28+
image: windows.vs2022.amd64.open
3929
${{ if eq(variables['System.TeamProject'], 'internal') }}:
4030
name: $(DncEngInternalBuildPool)
41-
image: 1es-windows-2022
42-
os: windows
31+
image: windows.vs2022.amd64
4332

4433
steps:
4534
- ${{ if eq(parameters.is1ESPipeline, '') }}:
4635
- 'Illegal entry point, is1ESPipeline is not defined. Repository yaml should not directly reference templates in core-templates folder.': error
4736

4837
- ${{ each preStep in parameters.preSteps }}:
4938
- ${{ preStep }}
50-
51-
- task: UseDotNet@2
52-
displayName: Use .NET 8 SDK
53-
inputs:
54-
packageType: sdk
55-
version: 8.0.x
56-
installationPath: $(Agent.TempDirectory)/dotnet
57-
workingDirectory: $(Agent.TempDirectory)
58-
59-
- script: |
60-
$(Agent.TempDirectory)/dotnet/dotnet tool install BinLogToSln --version $(sourceIndexProcessBinlogPackageVersion) --add-source $(SourceIndexPackageSource) --tool-path $(Agent.TempDirectory)/.source-index/tools
61-
$(Agent.TempDirectory)/dotnet/dotnet tool install UploadIndexStage1 --version $(sourceIndexUploadPackageVersion) --add-source $(SourceIndexPackageSource) --tool-path $(Agent.TempDirectory)/.source-index/tools
62-
displayName: Download Tools
63-
# Set working directory to temp directory so 'dotnet' doesn't try to use global.json and use the repo's sdk.
64-
workingDirectory: $(Agent.TempDirectory)
65-
6639
- script: ${{ parameters.sourceIndexBuildCommand }}
6740
displayName: Build Repository
6841

69-
- script: $(Agent.TempDirectory)/.source-index/tools/BinLogToSln -i $(BinlogPath) -r $(Build.SourcesDirectory) -n $(Build.Repository.Name) -o .source-index/stage1output
70-
displayName: Process Binlog into indexable sln
71-
72-
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
73-
- task: AzureCLI@2
74-
displayName: Log in to Azure and upload stage1 artifacts to source index
75-
inputs:
76-
azureSubscription: 'SourceDotNet Stage1 Publish'
77-
addSpnToEnvironment: true
78-
scriptType: 'ps'
79-
scriptLocation: 'inlineScript'
80-
inlineScript: |
81-
$(Agent.TempDirectory)/.source-index/tools/UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name) -s netsourceindexstage1 -b stage1
42+
- template: /eng/common/core-templates/steps/source-index-stage1-publish.yml
43+
parameters:
44+
binLogPath: ${{ parameters.binLogPath }}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
parameters:
2+
sourceIndexUploadPackageVersion: 2.0.0-20240522.1
3+
sourceIndexProcessBinlogPackageVersion: 1.0.1-20240522.1
4+
sourceIndexPackageSource: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json
5+
binlogPath: artifacts/log/Debug/Build.binlog
6+
7+
steps:
8+
- task: UseDotNet@2
9+
displayName: "Source Index: Use .NET 8 SDK"
10+
inputs:
11+
packageType: sdk
12+
version: 8.0.x
13+
installationPath: $(Agent.TempDirectory)/dotnet
14+
workingDirectory: $(Agent.TempDirectory)
15+
16+
- script: |
17+
$(Agent.TempDirectory)/dotnet/dotnet tool install BinLogToSln --version ${{parameters.sourceIndexProcessBinlogPackageVersion}} --add-source ${{parameters.SourceIndexPackageSource}} --tool-path $(Agent.TempDirectory)/.source-index/tools
18+
$(Agent.TempDirectory)/dotnet/dotnet tool install UploadIndexStage1 --version ${{parameters.sourceIndexUploadPackageVersion}} --add-source ${{parameters.SourceIndexPackageSource}} --tool-path $(Agent.TempDirectory)/.source-index/tools
19+
displayName: "Source Index: Download netsourceindex Tools"
20+
# Set working directory to temp directory so 'dotnet' doesn't try to use global.json and use the repo's sdk.
21+
workingDirectory: $(Agent.TempDirectory)
22+
23+
- script: $(Agent.TempDirectory)/.source-index/tools/BinLogToSln -i ${{parameters.BinlogPath}} -r $(Build.SourcesDirectory) -n $(Build.Repository.Name) -o .source-index/stage1output
24+
displayName: "Source Index: Process Binlog into indexable sln"
25+
26+
- ${{ if and(ne(parameters.runAsPublic, 'true'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
27+
- task: AzureCLI@2
28+
displayName: "Source Index: Upload Source Index stage1 artifacts to Azure"
29+
inputs:
30+
azureSubscription: 'SourceDotNet Stage1 Publish'
31+
addSpnToEnvironment: true
32+
scriptType: 'ps'
33+
scriptLocation: 'inlineScript'
34+
inlineScript: |
35+
$(Agent.TempDirectory)/.source-index/tools/UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name) -s netsourceindexstage1 -b stage1
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
steps:
2+
- template: /eng/common/core-templates/steps/source-index-stage1-publish.yml
3+
parameters:
4+
is1ESPipeline: true
5+
6+
${{ each parameter in parameters }}:
7+
${{ parameter.key }}: ${{ parameter.value }}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
steps:
2+
- template: /eng/common/core-templates/steps/source-index-stage1-publish.yml
3+
parameters:
4+
is1ESPipeline: false
5+
6+
${{ each parameter in parameters }}:
7+
${{ parameter.key }}: ${{ parameter.value }}

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"jdk": "11"
2828
},
2929
"msbuild-sdks": {
30-
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.24459.1",
31-
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.24459.1"
30+
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.24463.4",
31+
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.24463.4"
3232
}
3333
}

src/Components/WebAssembly/DevServer/src/Server/Startup.cs

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33

44
using Microsoft.AspNetCore.Builder;
5+
using Microsoft.AspNetCore.Hosting;
56
using Microsoft.AspNetCore.Http;
67
using Microsoft.Extensions.Configuration;
78
using Microsoft.Extensions.DependencyInjection;
@@ -29,27 +30,28 @@ public static void Configure(IApplicationBuilder app, IConfiguration configurati
2930

3031
app.UseWebAssemblyDebugging();
3132

32-
bool applyCopHeaders = configuration.GetValue<bool>("ApplyCopHeaders");
33+
var webHostEnvironment = app.ApplicationServices.GetRequiredService<IWebHostEnvironment>();
34+
var applyCopHeaders = configuration.GetValue<bool>("ApplyCopHeaders");
3335

34-
if (applyCopHeaders)
36+
app.Use(async (ctx, next) =>
3537
{
36-
app.Use(async (ctx, next) =>
38+
if (ctx.Request.Path.StartsWithSegments("/_framework/blazor.boot.json"))
3739
{
38-
if (ctx.Request.Path.StartsWithSegments("/_framework") && !ctx.Request.Path.StartsWithSegments("/_framework/blazor.server.js") && !ctx.Request.Path.StartsWithSegments("/_framework/blazor.web.js"))
40+
ctx.Response.Headers.Append("Blazor-Environment", webHostEnvironment.EnvironmentName);
41+
}
42+
else if (applyCopHeaders && ctx.Request.Path.StartsWithSegments("/_framework") && !ctx.Request.Path.StartsWithSegments("/_framework/blazor.server.js") && !ctx.Request.Path.StartsWithSegments("/_framework/blazor.web.js"))
43+
{
44+
var fileExtension = Path.GetExtension(ctx.Request.Path);
45+
if (string.Equals(fileExtension, ".js", StringComparison.OrdinalIgnoreCase))
3946
{
40-
string fileExtension = Path.GetExtension(ctx.Request.Path);
41-
if (string.Equals(fileExtension, ".js"))
42-
{
43-
// Browser multi-threaded runtime requires cross-origin policy headers to enable SharedArrayBuffer.
44-
ApplyCrossOriginPolicyHeaders(ctx);
45-
}
47+
// Browser multi-threaded runtime requires cross-origin policy headers to enable SharedArrayBuffer.
48+
ApplyCrossOriginPolicyHeaders(ctx);
4649
}
50+
}
4751

48-
await next(ctx);
49-
});
50-
}
52+
await next(ctx);
53+
});
5154

52-
//app.UseBlazorFrameworkFiles();
5355
app.UseRouting();
5456

5557
app.UseStaticFiles(new StaticFileOptions

src/Components/test/E2ETest/Tests/WebAssemblyConfigurationTest.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ public void WebAssemblyConfiguration_Works()
3939

4040
if (_serverFixture.TestTrimmedOrMultithreadingApps)
4141
{
42+
// Verify that the environment gets detected as 'Production'.
43+
Browser.Equal("Production", () => _appElement.FindElement(By.Id("environment")).Text);
44+
4245
// Verify values overriden by an environment specific 'appsettings.$(Environment).json are read
4346
Assert.Equal("Prod key2-value", _appElement.FindElement(By.Id("key2")).Text);
4447

@@ -47,6 +50,9 @@ public void WebAssemblyConfiguration_Works()
4750
}
4851
else
4952
{
53+
// Verify that the dev server always correctly serves the 'Blazor-Environment: Development' header.
54+
Browser.Equal("Development", () => _appElement.FindElement(By.Id("environment")).Text);
55+
5056
// Verify values overriden by an environment specific 'appsettings.$(Environment).json are read
5157
Assert.Equal("Development key2-value", _appElement.FindElement(By.Id("key2")).Text);
5258

0 commit comments

Comments
 (0)