MudBlazor / TryMudBlazor

A playground for trying out and testing MudBlazor components entirely in the browser.
https://try.mudblazor.com/
GNU General Public License v2.0
75 stars 37 forks source link

Attempt to fix loading of Try.UserComponents.dll #111

Closed ScarletKuro closed 1 year ago

ScarletKuro commented 1 year ago

This is an attempt to fix: https://github.com/MudBlazor/TryMudBlazor/issues/105 https://github.com/MudBlazor/MudBlazor/issues/4418 https://github.com/MudBlazor/MudBlazor/issues/6222 https://github.com/MudBlazor/MudBlazor/discussions/6471

This is ported from BlazorSnippet which is a continuation of the discontinued open source project BlazorREPL. The BlazorSnippet is under GPL-2.0 license, same as TryMudBlazor, so it should be fine.

If I understand it correctly, the problems is that for some reason the Try.UserComponents.__Main fails to load in ExecuteUserDefinedConfiguration for some cache reason, and this code potentially should fallback and recreate default Try.UserComponents.dll from the base64 and put in the cache.

henon commented 1 year ago

You took that 1:1 from BlazorSnippet or did you modify also?

henon commented 1 year ago

Thanks a lot!

ScarletKuro commented 1 year ago

You took that 1:1 from BlazorSnippet or did you modify also?

Replaced interface from IJSUnmarshalledRuntime to IJSInProcessRuntime, because BlazorSnippet is on net6, we are on net7 and this IJSUnmarshalledRuntime is obsolete there.