Skip to content

[Blazor] Custom ICU loading from runtime path #90018

Closed

Description

@ilonatommy

First merge #89771, then fix this one.

  • Load properly a user-created custom file from a full path - easy to fix.
  • Load a runtime-pack custom file from a full path:
/workspaces/runtime/artifacts/bin/dotnet-latest/sdk/8.0.100-rc.1.23404.1/Sdks/Microsoft.NET.Sdk.StaticWebAssets/targets/Microsoft.NET.Sdk.StaticWebAssets.targets(475,5): 
error : Conflicting assets with the same target path '_framework/icudt.dat'.

Even when we make sure that icudt.dat filename is removed from the @(WasmNativeAsset) item before adding it, it still keeps a duplicated entry with this value. Most probably some Task is adding it after Blazor SDK's _ResolveGlobalizationConfiguration is executed but no idea how.

  • Load a runtime-pack custom file from a relative path:
    In Wasm app we are able to load the files from paths relative to runtime pack because we have access to $(MicrosoftNetCoreAppRuntimePackRidNativeDir) value and we append it as a prefix in case the path passed to custom icu msbuild property is not absolute:
    <_WasmIcuDataFileName Condition="'$(HybridGlobalization)' != 'true' and '$(WasmIcuDataFileName)' != '' and !Exists('$(WasmIcuDataFileName)')">$(MicrosoftNetCoreAppRuntimePackRidNativeDir)$(WasmIcuDataFileName)</_WasmIcuDataFileName>

    In Blazor we don't have access to that directly. We could extract it assuming that e.g. dotnet.js is in the runtime pack location and assuming that its added to @(WasmNativeAsset) but it's not a perfect solution.
    cc @lewing

Activity

  1. added this to the 8.0.0 milestone on Aug 4, 2023
  2. self-assigned this
    on Aug 4, 2023
  3. ghost added
    in-prThere is an active PR which will close this issue when it is merged
    on Aug 9, 2023
  4. ghost removed
    in-prThere is an active PR which will close this issue when it is merged
    on Aug 14, 2023
  5. ghost locked as resolved and limited conversation to collaborators on Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions