Wasm Sample: Simple greeting and counter (C#)
The purpose of this sample is to demonstrate the concept of building a WebAssembly application on top of the mono runtime. The mono runtime headers should be supplied through the build process.
This sample will only run on macOS.
- Working browser
- .NET sdk 6.0.100-alpha.1.20628.2.
- dotnet-serve (https://github.com/natemcmain/dotnet-serve)
To install a specific version of the dotnet sdk, download the latest stable version of the dotnet-install script:
Install version .NET version 6.0.100-alpha.1.20628.2:
./dotnet-install.sh --version 6.0.100-alpha.1.20628.2
Building the sample
The source code includes an MSBuild project file for C# (a .csproj file) that targets .NET 6.0. After downloading the .zip file, run the sample by opening the command line, navigating to the downloaded folder, and run
dotnet publishs in succession, remove both the
obj/ folders. Otherwise,
System.IO.IOException: The process cannot access the file ... because it is being used by another process. may result.