WebAssembly in Uno platform not compiling due to an error on Microsoft.Toolkit.Uwp.UI.dll

367 views Asked by At

So, I have been trying to compile a Wasm project with Uno.WebAssembly 3.0.17 but I get this error:

Mono.Linker.MarkException: Error processing method: 'System.Void Microsoft.Toolkit.Uwp.UI.Converters.BoolToObjectConverter::.cctor()' in assembly: 'Microsoft.Toolkit.Uwp.UI.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve Uno.Diagnostics.Eventing.IEventProvider Uno.Diagnostics.Eventing.Tracing::Get(System.Guid)

Recently I had a similar issue with WebAssembly but was with the assembly Microsoft.Xaml.Interactivity.dll and the solution was to install the lastest version of the package Uno.Microsoft.Xaml.Behaviors.Uwp.Managed and the project resolved that problem, but this time i have no idea what package should I install to solve this problem. Any help?

Here is a snapshot of the error

1

There are 1 answers

2
David Oliver On BEST ANSWER

The BoolToObjectConverter class is coming from the Windows Community Toolkit.

The Uno-compatible version is located in the Uno.Microsoft.Toolkit.Uwp.UI NuGet package. The NuGet packages for other WCT components are similarly named with a Uno.* prefix. If you install the latest. Uno.* versions in your WebAssembly head of all the WCT packages that are in your UWP head, it should work.