BlazorDesktopLauncher 1.4.0

dotnet add package BlazorDesktopLauncher --version 1.4.0                
NuGet\Install-Package BlazorDesktopLauncher -Version 1.4.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BlazorDesktopLauncher" Version="1.4.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BlazorDesktopLauncher --version 1.4.0                
#r "nuget: BlazorDesktopLauncher, 1.4.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// 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

  1. Start with a razor class library
  2. Add BlazorDesktopLauncher nuget package
  3. Add a Program.cs file with a main method as entry point
  4. Instantiate a new DesktopApplication, you can use the Component1 from the template for your applications main component (DesktopApplication<Component1>).
  5. Call RunAsync Method with await or .Wait()
  6. 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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