Skip to content

[browser] Remove public WasmInlineBootConfig, WasmBootConfigFileName properties#125645

Draft
maraf wants to merge 5 commits intomainfrom
maraf/BrowserWasmOverrideBootConfigName
Draft

[browser] Remove public WasmInlineBootConfig, WasmBootConfigFileName properties#125645
maraf wants to merge 5 commits intomainfrom
maraf/BrowserWasmOverrideBootConfigName

Conversation

@maraf
Copy link
Member

@maraf maraf commented Mar 17, 2026

… and withConfigSrc API

Drop support for overriding the boot config file name via public MSBuild properties (WasmInlineBootConfig, WasmBootConfigFileName) and the withConfigSrc TypeScript API. Users should either use the default embedded boot config or implement their own solution.

  • Remove public MSBuild property references; private defaults unchanged
  • Remove withConfigSrc from TypeScript API (host-builder, run.ts, types)
  • Move configSrc from public DotnetModuleConfig to internal type
  • Remove OverrideBootConfigName test and test asset
  • Remove BootConfigFileName from test infrastructure

Fixes #124947

… and withConfigSrc API

Drop support for overriding the boot config file name via public MSBuild
properties (WasmInlineBootConfig, WasmBootConfigFileName) and the
withConfigSrc TypeScript API. Users should either use the default
embedded boot config or implement their own solution.

- Remove public MSBuild property references; private defaults unchanged
- Remove withConfigSrc from TypeScript API (host-builder, run.ts, types)
- Move configSrc from public DotnetModuleConfig to internal type
- Remove OverrideBootConfigName test and test asset
- Remove BootConfigFileName from test infrastructure

Fixes #124947

Co-authored-by: Copilot <[email protected]>
@maraf maraf added this to the 11.0.0 milestone Mar 17, 2026
@maraf maraf self-assigned this Mar 17, 2026
Copilot AI review requested due to automatic review settings March 17, 2026 11:02
@maraf maraf added arch-wasm WebAssembly architecture area-Build-mono os-browser Browser variant of arch-wasm labels Mar 17, 2026
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes public customization hooks for the WASM boot config source/name (MSBuild properties WasmInlineBootConfig / WasmBootConfigFileName and the TypeScript withConfigSrc API), aligning the browser runtime and tests with using the default embedded boot config or fully custom user solutions.

Changes:

  • Removes withConfigSrc from the browser runtime’s public TypeScript API surface (types + HostBuilder implementation) and moves configSrc to internal module typing.
  • Removes public MSBuild property wiring for boot config override and keeps internal defaults for _WasmInlineBootConfig / _WasmBootConfigFileName.
  • Deletes the OverrideBootConfigName test scenario and removes BootConfigFileName plumbing from the WASM build test infrastructure.

Reviewed changes

Copilot reviewed 16 out of 18 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/native/libs/Common/JavaScript/types/public-api.ts Removes public configSrc mention/field from the common JS public API typings.
src/native/libs/Common/JavaScript/loader/host-builder.ts Drops the unsupported withConfigSrc method from the common JS host builder.
src/native/libs/Common/JavaScript/loader/dotnet.d.ts Updates generated typings to remove configSrc from module config.
src/mono/browser/runtime/types/index.ts Removes withConfigSrc and configSrc from the public browser runtime typings.
src/mono/browser/runtime/dotnet.d.ts Mirrors public API removal in the .d.ts surface.
src/mono/browser/runtime/loader/run.ts Removes HostBuilder.withConfigSrc implementation.
src/mono/browser/runtime/types/internal.ts Adds configSrc to internal module typing so internal loader code can still use it.
src/mono/browser/runtime/startup.ts Updates comments to reflect removal of configSrc from public configuration.
src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Browser.targets Stops copying public MSBuild properties into internal boot config selection logic.
src/mono/wasm/testassets/WasmBasicTestApp/App/wwwroot/main.js Removes the OverrideBootConfigName JS test scenario code path.
src/mono/wasm/testassets/WasmBasicTestApp/App/OverrideBootConfigNameTest.cs Deletes the managed test asset used only by the removed scenario.
src/mono/wasm/Wasm.Build.Tests/ModuleConfigTests.cs Removes the OverrideBootConfigName test.
src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTestsBase.cs Removes passing WasmBootConfigFileName via test build options.
src/mono/wasm/Wasm.Build.Tests/WasmSdkBasedProjectProvider.cs Removes boot-config-name-dependent expectations in bundle assertions.
src/mono/wasm/Wasm.Build.Tests/ProjectProviderBase.cs Updates boot config assertion path resolution to no longer depend on BootConfigFileName.
src/mono/wasm/Wasm.Build.Tests/BrowserStructures/MSBuildOptions.cs Removes BootConfigFileName from base build/publish option records.
src/mono/wasm/Wasm.Build.Tests/BrowserStructures/BuildOptions.cs Removes BootConfigFileName from build options.
src/mono/wasm/Wasm.Build.Tests/BrowserStructures/PublishOptions.cs Removes BootConfigFileName from publish options.

You can also share your feedback on Copilot code review. Take the survey.

maraf and others added 2 commits March 17, 2026 14:52
- Add GetDefaultBootConfigFileName that probes for blazor.boot.json
  (pre-net10) before defaulting to dotnet.js, fixing compatibility
  with older TFMs in WorkloadsTestPreviousVersions scenarios
- Fix comment grammar in startup.ts

Co-authored-by: Copilot <[email protected]>
Copilot AI review requested due to automatic review settings March 17, 2026 18:35
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes public knobs for overriding the WASM boot config file name (MSBuild properties and the withConfigSrc TypeScript API) to avoid unsupported/unstable scenarios (notably the OverrideBootConfigName timeout in #124947) and simplifies the related test infrastructure.

Changes:

  • Remove withConfigSrc from the browser runtime TypeScript API surface and move configSrc to internal-only types.
  • Stop flowing public MSBuild properties (WasmInlineBootConfig, WasmBootConfigFileName) into the SDK’s internal properties; keep internal defaults.
  • Remove the OverrideBootConfigName test case, related test asset code, and BootConfigFileName plumbing in WASM build tests.

Reviewed changes

Copilot reviewed 16 out of 18 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/native/libs/Common/JavaScript/types/public-api.ts Removes configSrc from the public DotnetModuleConfig type and trims related doc text.
src/native/libs/Common/JavaScript/loader/host-builder.ts Drops the withConfigSrc API (previously throwing) from the host builder implementation.
src/native/libs/Common/JavaScript/loader/dotnet.d.ts Updates generated typings to remove configSrc from DotnetModuleConfig.
src/mono/wasm/testassets/WasmBasicTestApp/App/wwwroot/main.js Removes the OverrideBootConfigName JS scenario and associated output.
src/mono/wasm/testassets/WasmBasicTestApp/App/OverrideBootConfigNameTest.cs Deletes the managed test used by the removed scenario.
src/mono/wasm/Wasm.Build.Tests/WasmSdkBasedProjectProvider.cs Removes boot-config-name override expectations from bundle file checks.
src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTestsBase.cs Removes passing -p:WasmBootConfigFileName=... from build/publish helpers.
src/mono/wasm/Wasm.Build.Tests/ProjectProviderBase.cs Switches boot config assertions to use a “default boot config filename” probe instead of BootConfigFileName options.
src/mono/wasm/Wasm.Build.Tests/ModuleConfigTests.cs Removes the OverrideBootConfigName test coverage.
src/mono/wasm/Wasm.Build.Tests/BrowserStructures/PublishOptions.cs Removes BootConfigFileName from publish option records.
src/mono/wasm/Wasm.Build.Tests/BrowserStructures/MSBuildOptions.cs Removes BootConfigFileName from the shared MSBuild options record.
src/mono/wasm/Wasm.Build.Tests/BrowserStructures/BuildOptions.cs Removes BootConfigFileName from build option records.
src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Browser.targets Stops honoring public WasmInlineBootConfig / WasmBootConfigFileName and relies on internal defaults.
src/mono/browser/runtime/types/internal.ts Moves configSrc to internal module typing (EmscriptenModuleInternal).
src/mono/browser/runtime/types/index.ts Removes withConfigSrc and configSrc from the public browser runtime types.
src/mono/browser/runtime/startup.ts Updates comments related to default startup sequence; minor text changes.
src/mono/browser/runtime/loader/run.ts Removes the withConfigSrc implementation that merged configSrc into the module.
src/mono/browser/runtime/dotnet.d.ts Updates generated typings to remove withConfigSrc and configSrc.

You can also share your feedback on Copilot code review. Take the survey.

// - blazor.boot.json (pre-net10)
if (File.Exists(Path.Combine(binFrameworkDir, "blazor.boot.json")))
return "blazor.boot.json";

@@ -88,7 +88,7 @@ export function configureEmscriptenStartup (module: DotnetModuleInternal): void
module.mainScriptUrlOrBlob = loaderHelpers.scriptUrl;// this is needed by worker threads

// these all could be overridden on DotnetModuleConfig, we are chaing them to async below, as opposed to emscripten
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arch-wasm WebAssembly architecture area-Build-mono os-browser Browser variant of arch-wasm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[coreclr] OverrideBootConfigName timeouts in publish and build

2 participants