Skip to content

Document blazor msbuild configuration options #27395

Open

Description

@pbiggar

There are a bunch of knobs available to config blazor projects, that I could not find documented anywhere.

I raised the issue before and things were moved around a bit, so this issue is to ensure the old issue doesn't get lost.

The old issue is at dotnet/AspNetCore.Docs#24026


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Activity

  1. gewarren commented on Dec 8, 2021

    @gewarren
    Collaborator

    These are the undocumented props if anyone wants to pick this up:

    • EmccCompileOptimizationFlag - allows you set how the wasm gets compiled. For example, this creates wasm that runs with assertions enabled: <EmccCompileOptimizationFlag>-O0 -s ASSERTIONS=2 -s STACK_OVERFLOW_CHECK=2 -s SAFE_HEAP=1</EmccCompileOptimizationFlag>
    • EmccCompileLinkFlag - similar to EmccCompileOptimizationFlag but for linking
    • WasmNativeStrip: Strip the native executable. Defaults to true.
    • WasmLinkIcalls: Link out unused icalls. Defaults to the value of WasmBuildNative.
    • WasmDebugLevel: Enables debugging and sets the debug log level. A value greater than zero (0) enables debugging and sets the debug log level to debug_level. A value of zero (0) disables debugging and enables interpreter optimizations. A value less than zero (0) enables debugging and disables debug logging.
    • WasmDedup: String deduplication of generic instances when using AOT. Defaults to true.
    • WasmNativeDebugSymbols: Build with native debug symbols. Useful only with RunAOTCompilation or WasmBuildNative set to true. Defaults to true.
    • EmccVerbose: Set to false to disable verbose emcc output. Defaults to false❓

    If these are provided by the Microsoft.NET.Sdk SDK, they should be documented here: https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props.

  2. guardrex commented on Dec 29, 2021

    @guardrex
    Contributor

    @gewarren ... We just had a request to document WasmBuildNative (not on the list ☝️), but I believe 🤔 it's set for Release configuration automatically by the SDK (I'll check on that) ... so that's all we'll probably say in the ASP.NET Core doc set about it. Anyway, there are more optional properties than are in the list ☝️ ...

    https://github.com/dotnet/runtime/blob/main/src/mono/wasm/build/WasmApp.targets

    Artak yielded to Larry/Ankit/you to decide where best to document them and which ones. I'll cross-link for them after this issue is worked.

    UPDATE: I've cross-linked to the .targets file temporarily. I'll keep an 👁️ on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions