You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CoreCLR WebAssembly app builds generate per-app call helpers by running crossgen2 with --generate-portable-callhelpers over every managed assembly in the bundle
(WasiApp.CoreCLR.targets_WasiCoreCLRRelinkCoreRun; BrowserWasmApp.CoreCLR.targets uses the
same FilterManagedAssemblies step). crossgen2 requires each input's assembly name to match its file
name (CompilerTypeSystemContext), so the build fails when an app deploys an assembly under another
file name and loads it by path.
System.Runtime.Loader.DefaultContext.Tests does exactly this: it deploys System.Runtime.Loader.Noop.Assembly as System.Runtime.Loader.Noop.Assembly_test.dll. WASI CoreCLR
relinks the host for every app, so it always runs the generator and fails. Browser CoreCLR runs the
generator only when the app is relinked (WasmBuildNative), so the browser library lanes, which use the
prebuilt runtime for this suite, don't hit it. A relinked browser app that deploys such an assembly
would fail the same way: both platforms pass every published .dll to the generator.
EXEC : error : Assembly name does not match filename .../System.Runtime.Loader.DefaultContext.Tests/Release/net11.0/wasi-wasm/AppBundle/managed/System.Runtime.Loader.Noop.Assembly_test.dll
src/mono/wasi/build/WasiApp.CoreCLR.targets(283,5): error MSB3073: The command ".../crossgen2" "@.../callhelpers-generator.rsp" exited with code 1.
Seen in the wasi-wasm linux Release LibraryTestsCoreCLR_WASI lane of #134813
(build 1617382).
Expected
Assemblies deployed under another file name are still loaded at runtime, so their P/Invoke and
reverse P/Invoke signatures need call helpers. Skipping them would avoid the build error but can
leave missing helpers that only fail at runtime. A possible fix is to stage a copy named after the
assembly's metadata name for the generator, leaving the bundle layout unchanged.
Re-enable
Remove the WASI CoreCLR ProjectExclusions entry for System.Runtime.Loader.DefaultContext.Tests in src/libraries/tests.proj once call-helper
generation accepts such assemblies.
Note
This issue was drafted with the help of GitHub Copilot.
Description
CoreCLR WebAssembly app builds generate per-app call helpers by running crossgen2 with
--generate-portable-callhelpersover every managed assembly in the bundle(
WasiApp.CoreCLR.targets_WasiCoreCLRRelinkCoreRun;BrowserWasmApp.CoreCLR.targetsuses thesame
FilterManagedAssembliesstep). crossgen2 requires each input's assembly name to match its filename (
CompilerTypeSystemContext), so the build fails when an app deploys an assembly under anotherfile name and loads it by path.
System.Runtime.Loader.DefaultContext.Testsdoes exactly this: it deploysSystem.Runtime.Loader.Noop.AssemblyasSystem.Runtime.Loader.Noop.Assembly_test.dll. WASI CoreCLRrelinks the host for every app, so it always runs the generator and fails. Browser CoreCLR runs the
generator only when the app is relinked (
WasmBuildNative), so the browser library lanes, which use theprebuilt runtime for this suite, don't hit it. A relinked browser app that deploys such an assembly
would fail the same way: both platforms pass every published
.dllto the generator.Seen in the
wasi-wasm linux Release LibraryTestsCoreCLR_WASIlane of#134813
(build 1617382).
Expected
Assemblies deployed under another file name are still loaded at runtime, so their P/Invoke and
reverse P/Invoke signatures need call helpers. Skipping them would avoid the build error but can
leave missing helpers that only fail at runtime. A possible fix is to stage a copy named after the
assembly's metadata name for the generator, leaving the bundle layout unchanged.
Re-enable
Remove the WASI CoreCLR
ProjectExclusionsentry forSystem.Runtime.Loader.DefaultContext.Testsinsrc/libraries/tests.projonce call-helpergeneration accepts such assemblies.
Note
This issue was drafted with the help of GitHub Copilot.