Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

LostBeard/BlazorWASMScriptLoader

Open more actions menu

Repository files navigation

Superseded

This project is superseded by SpawnDev.BlazorJS.CodeRunner. It takes the methods in this repo, and some great work by others to solve some problems in newer versions of .Net Blazor and improve compatibility.

BlazorWASMScriptLoader

Basic example of how to compile and run .Net code at runtime in Blazor WebAssembly.

Update for .Net 8:

In .Net 8, Blazor WASM apps use .wasm files by default instead of .dll files. This is the Webcil format and it "addresses environments that block clients from downloading and executing DLLs". The problem is .wasm files do not contain the MetadataReference data like the .dll files do. A workaround is to switch back to using .dlls by using the <WasmEnableWebcil>false</WasmEnableWebcil> tag in the project .csproj file.

About

Basic example of how to compile C# inside a Blazor WASM app

Resources

Stars

Watchers

Forks

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.