BlazorDesktopLauncher 1.4.0
dotnet add package BlazorDesktopLauncher --version 1.4.0
NuGet\Install-Package BlazorDesktopLauncher -Version 1.4.0
<PackageReference Include="BlazorDesktopLauncher" Version="1.4.0" />
paket add BlazorDesktopLauncher --version 1.4.0
#r "nuget: BlazorDesktopLauncher, 1.4.0"
// Install BlazorDesktopLauncher as a Cake Addin #addin nuget:?package=BlazorDesktopLauncher&version=1.4.0 // Install BlazorDesktopLauncher as a Cake Tool #tool nuget:?package=BlazorDesktopLauncher&version=1.4.0
BlazorDesktopLauncher
Launches a razor class library as blazor server application and starts a navigation less browser frame.
!THIS IS EXPERIMENTAL!
Getting started
SimpleApp example
- Start with a razor class library
- Add BlazorDesktopLauncher nuget package
- Add a Program.cs file with a main method as entry point
- Instantiate a new DesktopApplication, you can use the Component1
from the template for your applications main component (
DesktopApplication<Component1>
). - Call RunAsync Method with await or .Wait()
- Change .csproj OutputType to Exe (
<OutputType>Exe</OutputType>
)
Setup static content
Add following code to your .csproj:
<ItemGroup>
<Content Update="wwwroot\**">
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
Load stylesheet in your Component1
Add following code to your Component1:
<link rel="stylesheet" href="styles.css" />
Run application in a locally installed browser
By default the launcher will download a chromium browser. On many systems a chromium browser is already installed, so the launcher is able to try using it.
For this you have to modify the instantiation of the DesktopApplication. Add an argument:
appConfiguration: app => app.UseLocalBrowser()
.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.1 is compatible. |
-
.NETCoreApp 3.1
- PuppeteerSharp (>= 6.2.0)
-
net5.0
- PuppeteerSharp (>= 6.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.4.0 | 551 | 4/11/2022 |
1.3.0 | 938 | 11/25/2020 |
1.2.0 | 2,166 | 10/23/2020 |
1.1.0 | 684 | 9/26/2020 |
1.0.0 | 448 | 9/9/2020 |
1.0.0-preview4 | 962 | 8/30/2020 |
1.0.0-preview3 | 388 | 8/30/2020 |
1.0.0-preview2 | 340 | 8/28/2020 |
1.0.0-preview1 | 317 | 8/28/2020 |