In our setup we run a .net 5 application on an embedded Linux target. In future we may want to run it on a windows system. For the user interface we are evaluating the uno platform. Because we want the user interface to be available remotely, I'm trying to run an uno webassembly on the target.
I've created the project in VS Code like described in https://platform.uno/docs/articles/get-started-vscode.html. This application runs locally as described on the web site. The Program.cs is
using System;
using Windows.UI.Xaml;
namespace Terminal.Uno.Wasm
{
public class Program
{
private static App _app;
static int Main(string[] args)
{
Windows.UI.Xaml.Application.Start(_ => _app = new App());
return 0;
}
}
}
I've updated the json files for remote deployment and debugging. This works, the application starts and the debugger positions itself on the entry point.
As soon as I execute the first line of Main, I get the exception
Unhandled exception. System.Security.SecurityException: ECall methods must be packaged into a system module.
at WebAssembly.Runtime.NetCoreInvokeJS(String str, Int32& exceptionResult)
at WebAssembly.Runtime.InvokeJS(String str)
at Uno.Foundation.WebAssemblyRuntime.InnerInvokeJS(String str)
at Uno.Foundation.WebAssemblyRuntime.InvokeJS(String str)
at Uno.UI.Xaml.WindowManagerInterop.Init(Boolean isHostedMode, Boolean isLoadEventsEnabled)
at Windows.UI.Xaml.Application.StartPartial(ApplicationInitializationCallback callback)
at Windows.UI.Xaml.Application.Start(ApplicationInitializationCallback callback)
at Terminal.Uno.Wasm.Program.Main(String[] args) in C:\PALplus\Development\Trunk_UISandbox\Implementation\Core System\Source\Platform\Test\Terminal.Uno\Terminal.Uno.Wasm\Program.cs:line 12
Any idea what the issue could be?