Skip to content

Web Assembly Support

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

WebAssembly allows .NET Core assemblies to be run inside a browser. That means C# apps using RestClient.Net can be compiled for a web browser. 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.

  • 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 not installed (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 will open in your default browser.
  • Click "Get My Repos" to get my public repos, or enter your own username/password for your private repos
  • This is the code. It's shared across Wasm and UWP
  • If you run the RestClient.Net.Samples.Uno.UWP project, you will see that the app is almost identical to the one in the browser
  • Log any issues in the issues section please!

Clone this wiki locally