Why does WebAssembly fail to build on fresh Uno Platform template

393 views Asked by At

Summary:

When I attempt to build and run my Uno WebAssembly on Ubuntu 20.04, it fails. The error cites a file or directory that doesn't exist.

Steps to reproduce:

  1. Open Ubuntu 20.04 platform
  2. Install .NET Core SDK 3.1.403
  3. Follow the "Getting Started on VSCode" tutorial here
  4. When you attempt to start the app with the .NET Core Launch configuration, note that the build fails.

Error Details:

/home/<user>/.nuget/packages/uno.wasm.bootstrap/1.3.4/build/Uno.Wasm.Bootstrap.targets(126,2): error : System.ComponentModel.Win32Exception (2): No such file or directory [/home/<user>/Projects/uapp/uapp.Wasm/uapp.Wasm.csproj]

What I've tried

My knowledge of Uno Platform is approximately 1 day old. I'm not sure I understand enough about it to even know what to try, but I have done these things:

  • Run dotnet run from within the uapp.Skia.Gtk, which successfully opened the window I expected to see.
  • Run dotnet run from within uapp.Wasm, which resulted in the error described above.
  • Look on the documentation for clues on why the file might not be found on a fresh template that's not been modified (I could not find anything)

Question:

What should I be doing differently to get the Web Assembly to build and display the app correctly?

EDIT: The file in the error does exist, precisely in the path in the error.

1

There are 1 answers

0
Jérôme Laban On BEST ANSWER

You're hitting an error that may happen when building with some native components, like SQLite or Skia.

To fix this, you'll need to execute the dotnet-setup.sh installation script which is not yet run automatically.

This script installs .NET Core, mono and ninja, on ubuntu-alike systems.