LiveSharp is now free and open source. Please visit https://github.com/ionoy/LiveSharp if you want to build it yourself.
Hot Reload for Blazor, Xamarin Forms, UNO, and any other C# project!
Xamarin.Forms hot reload
Update ViewModel or Page code and see the changes immediately reflected in the app.
Instant Blazor hot reload
Update .razor and C# files, and see the updates instantly without reloading the page. Your page state is preserved because there is no need to restart the application.
ASP.NET Core support
You can update ASP.NET controllers and instantly see the updated behaviour in the browser. The update is very fast compared to
dotnet watch that requires a full recompilation. Also, your session stays completely intact because there is no need to restart the app.
Any code update
No matter what application you are developing. As long as your framework supports .NET Standard 2.0, you can use LiveSharp to update the code in runtime.
You can even write customize the hot reload behavior, so it would suit your particular project.
You need a server application running in the background for LiveSharp to work. The server also provides you with Live Debugging UI, logs and other useful functionality.
- Open terminal
- Install server
dotnet tool install --global livesharp.server
- Run server
To integrate LiveSharp into your app, you need a NuGet package installed in your main project along with other projects that require updates. For example, with Xamarin.Forms this would be a .NET Standard project.
How do I disable LiveSharp for release builds?
LIVESHARP_DISABLE compilation symbol for release build configuration.
Do I need any code to initialize LiveSharp?
No, LiveSharp uses a build task that injects the initialization code.
My application doesn’t connect to the LiveSharp server, what do I do?
First of all, check the Output window in Visual Studio (or Rider) during the build. There can be some useful warnings from LiveSharp.
Secondly, make sure that both the application and your developer machine are in the same network.