Skip to content

Commit 89c3d6b

Browse files
Merge pull request #24990 from dotnet-maestro-bot/merge/release/5.0-to-master
[automated] Merge branch 'release/5.0' => 'master'
2 parents 4995bbf + 333d009 commit 89c3d6b

File tree

113 files changed

+3532
-1294
lines changed

Some content is hidden

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

113 files changed

+3532
-1294
lines changed

.github/workflows/runtime-sync.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,14 @@ jobs:
2121
# Test this script using changes in a fork
2222
repository: 'dotnet/aspnetcore'
2323
path: aspnetcore
24+
ref: release/5.0
2425
- name: Checkout runtime
2526
uses: actions/checkout@v2.0.0
2627
with:
2728
# Test this script using changes in a fork
2829
repository: 'dotnet/runtime'
2930
path: runtime
31+
ref: release/5.0
3032
- name: Copy
3133
shell: cmd
3234
working-directory: .\runtime\src\libraries\Common\src\System\Net\Http\aspnetcore\
@@ -65,5 +67,6 @@ jobs:
6567
title: 'Sync shared code from runtime'
6668
body: 'This PR was automatically generated to sync shared code changes from runtime. Fixes #18943'
6769
labels: area-servers
70+
base: release/5.0
6871
branch: github-action/sync-runtime
6972
branch-suffix: timestamp

AspNetCore.sln

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

eng/Dependencies.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ and are generated based on the last package release.
107107
<LatestPackageReference Include="Microsoft.Bcl.AsyncInterfaces" />
108108
<LatestPackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" />
109109
<LatestPackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" />
110+
<LatestPackageReference Include="Microsoft.EntityFrameworkCore.Design" />
110111
<LatestPackageReference Include="Microsoft.EntityFrameworkCore.InMemory" />
111112
<LatestPackageReference Include="Microsoft.EntityFrameworkCore.Relational" />
112113
<LatestPackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" />

eng/Version.Details.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@
4141
<Uri>https://github.com/dotnet/efcore</Uri>
4242
<Sha>ede96af3fdf94ae6b149f10451d573c37fe27669</Sha>
4343
</Dependency>
44+
<Dependency Name="Microsoft.EntityFrameworkCore.Design" Version="6.0.0-alpha.1.20417.8">
45+
<Uri>https://github.com/dotnet/efcore</Uri>
46+
<Sha>5099d918192f5df031e1ff5e3beea9cb361c605a</Sha>
47+
</Dependency>
4448
<Dependency Name="Microsoft.Extensions.Caching.Abstractions" Version="5.0.0-rc.1.20417.14">
4549
<Uri>https://github.com/dotnet/runtime</Uri>
4650
<Sha>907f7da59b40c80941b02ac2a46650adf3f606bc</Sha>

eng/Versions.props

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@
140140
<MicrosoftEntityFrameworkCoreSqlServerPackageVersion>6.0.0-alpha.1.20417.8</MicrosoftEntityFrameworkCoreSqlServerPackageVersion>
141141
<MicrosoftEntityFrameworkCoreToolsPackageVersion>6.0.0-alpha.1.20417.8</MicrosoftEntityFrameworkCoreToolsPackageVersion>
142142
<MicrosoftEntityFrameworkCorePackageVersion>6.0.0-alpha.1.20417.8</MicrosoftEntityFrameworkCorePackageVersion>
143+
<MicrosoftEntityFrameworkCoreDesignPackageVersion>6.0.0-alpha.1.20417.8</MicrosoftEntityFrameworkCoreDesignPackageVersion>
143144
</PropertyGroup>
144145
<!--
145146
@@ -250,11 +251,11 @@
250251
<GrpcAuthPackageVersion>2.27.0</GrpcAuthPackageVersion>
251252
<GrpcNetClientPackageVersion>2.27.0</GrpcNetClientPackageVersion>
252253
<GrpcToolsPackageVersion>2.27.0</GrpcToolsPackageVersion>
253-
<IdentityServer4AspNetIdentityPackageVersion>3.0.0</IdentityServer4AspNetIdentityPackageVersion>
254-
<IdentityServer4EntityFrameworkPackageVersion>3.0.0</IdentityServer4EntityFrameworkPackageVersion>
255-
<IdentityServer4PackageVersion>3.0.0</IdentityServer4PackageVersion>
256-
<IdentityServer4StoragePackageVersion>3.0.0</IdentityServer4StoragePackageVersion>
257-
<IdentityServer4EntityFrameworkStoragePackageVersion>3.0.0</IdentityServer4EntityFrameworkStoragePackageVersion>
254+
<IdentityServer4AspNetIdentityPackageVersion>4.0.4</IdentityServer4AspNetIdentityPackageVersion>
255+
<IdentityServer4EntityFrameworkPackageVersion>4.0.4</IdentityServer4EntityFrameworkPackageVersion>
256+
<IdentityServer4PackageVersion>4.0.4</IdentityServer4PackageVersion>
257+
<IdentityServer4StoragePackageVersion>4.0.4</IdentityServer4StoragePackageVersion>
258+
<IdentityServer4EntityFrameworkStoragePackageVersion>4.0.4</IdentityServer4EntityFrameworkStoragePackageVersion>
258259
<MessagePackPackageVersion>2.1.90</MessagePackPackageVersion>
259260
<MicrosoftIdentityWebPackageVersion>0.2.1-preview</MicrosoftIdentityWebPackageVersion>
260261
<MicrosoftIdentityWebUIPackageVersion>0.2.1-preview</MicrosoftIdentityWebUIPackageVersion>

src/Components/ComponentsNoDeps.slnf

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
"src\\Components\\WebAssembly\\DebugProxy\\src\\Microsoft.AspNetCore.Components.WebAssembly.DebugProxy.csproj",
2323
"src\\Components\\WebAssembly\\DevServer\\src\\Microsoft.AspNetCore.Components.WebAssembly.DevServer.csproj",
2424
"src\\Components\\WebAssembly\\JSInterop\\src\\Microsoft.JSInterop.WebAssembly.csproj",
25+
"src\\Components\\WebAssembly\\Sdk\\integrationtests\\Microsoft.NET.Sdk.BlazorWebAssembly.IntegrationTests.csproj",
26+
"src\\Components\\WebAssembly\\Sdk\\src\\Microsoft.NET.Sdk.BlazorWebAssembly.csproj",
27+
"src\\Components\\WebAssembly\\Sdk\\test\\Microsoft.NET.Sdk.BlazorWebAssembly.Tests.csproj",
28+
"src\\Components\\WebAssembly\\Sdk\\tools\\Microsoft.NET.Sdk.BlazorWebAssembly.Tools.csproj",
2529
"src\\Components\\WebAssembly\\Server\\src\\Microsoft.AspNetCore.Components.WebAssembly.Server.csproj",
2630
"src\\Components\\WebAssembly\\Server\\test\\Microsoft.AspNetCore.Components.WebAssembly.Server.Tests.csproj",
2731
"src\\Components\\WebAssembly\\WebAssembly.Authentication\\src\\Microsoft.AspNetCore.Components.WebAssembly.Authentication.csproj",
@@ -31,10 +35,9 @@
3135
"src\\Components\\WebAssembly\\testassets\\HostedInAspNet.Client\\HostedInAspNet.Client.csproj",
3236
"src\\Components\\WebAssembly\\testassets\\HostedInAspNet.Server\\HostedInAspNet.Server.csproj",
3337
"src\\Components\\WebAssembly\\testassets\\StandaloneApp\\StandaloneApp.csproj",
34-
"src\\Components\\WebAssembly\\Sdk\\src\\Microsoft.NET.Sdk.BlazorWebAssembly.csproj",
35-
"src\\Components\\WebAssembly\\Sdk\\test\\Microsoft.NET.Sdk.BlazorWebAssembly.Tests.csproj",
36-
"src\\Components\\WebAssembly\\Sdk\\tools\\Microsoft.NET.Sdk.BlazorWebAssembly.Tools.csproj",
37-
"src\\Components\\WebAssembly\\Sdk\\integrationtests\\Microsoft.NET.Sdk.BlazorWebAssembly.IntegrationTests.csproj",
38+
"src\\Components\\WebAssembly\\testassets\\Wasm.Authentication.Client\\Wasm.Authentication.Client.csproj",
39+
"src\\Components\\WebAssembly\\testassets\\Wasm.Authentication.Server\\Wasm.Authentication.Server.csproj",
40+
"src\\Components\\WebAssembly\\testassets\\Wasm.Authentication.Shared\\Wasm.Authentication.Shared.csproj",
3841
"src\\Components\\Web\\src\\Microsoft.AspNetCore.Components.Web.csproj",
3942
"src\\Components\\Web\\test\\Microsoft.AspNetCore.Components.Web.Tests.csproj",
4043
"src\\Components\\benchmarkapps\\Wasm.Performance\\ConsoleHost\\Wasm.Performance.ConsoleHost.csproj",

src/Components/Web.JS/dist/Release/blazor.server.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Components/Web.JS/dist/Release/blazor.webassembly.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Components/Web.JS/src/Platform/Mono/MonoDebugger.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,17 @@ import { WebAssemblyResourceLoader } from '../WebAssemblyResourceLoader';
33
const currentBrowserIsChrome = (window as any).chrome
44
&& navigator.userAgent.indexOf('Edge') < 0; // Edge pretends to be Chrome
55

6+
let isDebugging = true;
7+
8+
window.addEventListener('load', () => {
9+
const params = new URLSearchParams(window.location.search);
10+
isDebugging = params.get('_blazor_debug') === 'true';
11+
})
12+
613
let hasReferencedPdbs = false;
714

815
export function hasDebuggingEnabled() {
9-
return hasReferencedPdbs && currentBrowserIsChrome;
16+
return isDebugging && hasReferencedPdbs && currentBrowserIsChrome;
1017
}
1118

1219
export function attachDebuggerHotkey(resourceLoader: WebAssemblyResourceLoader) {
@@ -26,6 +33,8 @@ export function attachDebuggerHotkey(resourceLoader: WebAssemblyResourceLoader)
2633
console.error('Cannot start debugging, because the application was not compiled with debugging enabled.');
2734
} else if (!currentBrowserIsChrome) {
2835
console.error('Currently, only Microsoft Edge (80+), or Google Chrome, are supported for debugging.');
36+
} else if (!isDebugging) {
37+
console.error(`_blazor_debug query parameter must be set to enable debugging. To enable debugging, go to ${location.href}?_blazor_debug=true.`);
2938
} else {
3039
launchDebugger();
3140
}

src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import { attachDebuggerHotkey, hasDebuggingEnabled } from './MonoDebugger';
33
import { showErrorNotification } from '../../BootErrors';
44
import { WebAssemblyResourceLoader, LoadingResource } from '../WebAssemblyResourceLoader';
55
import { Platform, System_Array, Pointer, System_Object, System_String, HeapLock } from '../Platform';
6-
import { loadTimezoneData } from './TimezoneDataFile';
76
import { WebAssemblyBootResourceType } from '../WebAssemblyStartOptions';
87

98
let mono_wasm_add_assembly: (name: string, heapAddress: number, length: number) => void;
109
const appBinDirName = 'appBinDir';
10+
const icuDataResourceName = 'icudt.dat';
1111
const uint64HighOrderShift = Math.pow(2, 32);
1212
const maxSafeNumberHighPart = Math.pow(2, 21) - 1; // The high-order int32 from Number.MAX_SAFE_INTEGER
1313

@@ -239,14 +239,23 @@ function createEmscriptenModuleInstance(resourceLoader: WebAssemblyResourceLoade
239239
/* hash */ resourceLoader.bootConfig.resources.runtime[dotnetWasmResourceName],
240240
/* type */ 'dotnetwasm');
241241

242-
const dotnetTimeZoneResourceName = 'dotnet.timezones.dat';
242+
const dotnetTimeZoneResourceName = 'dotnet.timezones.blat';
243243
let timeZoneResource: LoadingResource | undefined;
244244
if (resourceLoader.bootConfig.resources.runtime.hasOwnProperty(dotnetTimeZoneResourceName)) {
245245
timeZoneResource = resourceLoader.loadResource(
246246
dotnetTimeZoneResourceName,
247247
`_framework/${dotnetTimeZoneResourceName}`,
248248
resourceLoader.bootConfig.resources.runtime[dotnetTimeZoneResourceName],
249-
'timezonedata');
249+
'globalization');
250+
}
251+
252+
let icuDataResource: LoadingResource | undefined;
253+
if (resourceLoader.bootConfig.resources.runtime.hasOwnProperty(icuDataResourceName)) {
254+
icuDataResource = resourceLoader.loadResource(
255+
icuDataResourceName,
256+
`_framework/${icuDataResourceName}`,
257+
resourceLoader.bootConfig.resources.runtime[icuDataResourceName],
258+
'globalization');
250259
}
251260

252261
// Override the mechanism for fetching the main wasm file so we can connect it to our cache
@@ -274,6 +283,13 @@ function createEmscriptenModuleInstance(resourceLoader: WebAssemblyResourceLoade
274283
loadTimezone(timeZoneResource);
275284
}
276285

286+
if (icuDataResource) {
287+
loadICUData(icuDataResource);
288+
} else {
289+
// Use invariant culture if the app does not carry icu data.
290+
MONO.mono_wasm_setenv("DOTNET_SYSTEM_GLOBALIZATION_INVARIANT", "1");
291+
}
292+
277293
// Fetch the assemblies and PDBs in the background, telling Mono to wait until they are loaded
278294
// Mono requires the assembly filenames to have a '.dll' extension, so supply such names regardless
279295
// of the extensions in the URLs. This allows loading assemblies with arbitrary filenames.
@@ -358,7 +374,11 @@ function createEmscriptenModuleInstance(resourceLoader: WebAssemblyResourceLoade
358374
resourceLoader.purgeUnusedCacheEntriesAsync(); // Don't await - it's fine to run in background
359375

360376
MONO.mono_wasm_setenv("MONO_URI_DOTNETRELATIVEORABSOLUTE", "true");
361-
MONO.mono_wasm_setenv("DOTNET_SYSTEM_GLOBALIZATION_INVARIANT", "1");
377+
let timeZone = "UTC";
378+
try {
379+
timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
380+
} catch { }
381+
MONO.mono_wasm_setenv("TZ", timeZone);
362382
// Turn off full-gc to prevent browser freezing.
363383
const mono_wasm_enable_on_demand_gc = cwrap('mono_wasm_enable_on_demand_gc', null, ['number']);
364384
mono_wasm_enable_on_demand_gc(0);
@@ -459,8 +479,27 @@ async function loadTimezone(timeZoneResource: LoadingResource) : Promise<void> {
459479

460480
const request = await timeZoneResource.response;
461481
const arrayBuffer = await request.arrayBuffer();
462-
loadTimezoneData(arrayBuffer)
463482

483+
Module['FS_createPath']('/', 'usr', true, true);
484+
Module['FS_createPath']('/usr/', 'share', true, true);
485+
Module['FS_createPath']('/usr/share/', 'zoneinfo', true, true);
486+
MONO.mono_wasm_load_data_archive(new Uint8Array(arrayBuffer), '/usr/share/zoneinfo/');
487+
488+
removeRunDependency(runDependencyId);
489+
}
490+
491+
async function loadICUData(icuDataResource: LoadingResource) : Promise<void> {
492+
const runDependencyId = `blazor:icudata`;
493+
addRunDependency(runDependencyId);
494+
495+
const request = await icuDataResource.response;
496+
const array = new Uint8Array(await request.arrayBuffer());
497+
498+
const offset = MONO.mono_wasm_load_bytes_into_heap(array);
499+
if (!MONO.mono_wasm_load_icu_data(offset))
500+
{
501+
throw new Error("Error loading ICU asset.");
502+
}
464503
removeRunDependency(runDependencyId);
465504
}
466505

0 commit comments

Comments
 (0)