Skip to content

Web Assembly Support

Christian Findlay edited this page Jan 3, 2020 · 4 revisions

WebAssembly allows .NET Core assemblies to run inside a browser. That means C# apps using RestClient.Net can run in a web browser without JavaScript. Two frameworks that enable .NET in a browser are Blazor and Uno Platform. Follow the steps below to run the Uno Platform sample in a browser. Note that this seems to only work on the Windows version of Visual Studio.

  • Clone this repo
  • Make sure you've got the .NET Core 3.1 SDK installed
  • Open the solution RestClient.Net.Samples.sln in Visual Studio 2017 or 2019
  • Switch to debug
  • Unload or remove any projects whose frameworks are missing (e.g., Android/iOS)
  • Restore NuGet packages and wait for them
  • Build RestClient.Net.Samples.Uno.Wasm
  • Set RestClient.Net.Samples.Uno.Wasm as the startup project and run it. It opens in your default browser.
  • Click "Get My Repos" to get my public repos, or enter your username/password for your private repos
  • Here is the code. Wasm and UWP share the code.
  • If you run the RestClient.Net.Samples.Uno.UWP project, you see that the app is almost identical to the one in the browser
  • Log any issues in the issues section, please!