Playzor.Server 1.1.0

dotnet add package Playzor.Server --version 1.1.0
                    
NuGet\Install-Package Playzor.Server -Version 1.1.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="Playzor.Server" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Playzor.Server" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Playzor.Server" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Playzor.Server --version 1.1.0
                    
#r "nuget: Playzor.Server, 1.1.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.
#:package Playzor.Server@1.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Playzor.Server&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Playzor.Server&version=1.1.0
                    
Install as a Cake Tool

Playzor

Playzor.Server

The server half of a self hosted Playzor playground.

// Program.cs
builder.Services.AddPlayzorServer();
…
app.MapPlayzorApi();

That is all a playground needs from its host. Without it the editor cannot install nuget packages — nuget.org answers without CORS headers, so the browser cannot fetch a .nupkg itself and needs a server to forward it.

Endpoints

Route Purpose
GET api/playzor/nuget/package/{id}/{version} Forwards the package and lets the browser cache it (id + version is immutable)
POST api/playzor/snippets Stores a snippet archive, answers with its id
GET api/playzor/snippets/{id} Reads a stored snippet
GET api/playzor/snippets/samples Names of the ready made samples
GET api/playzor/snippets/samples/{name} Reads a sample

The snippet endpoints need an IPlayzorSnippetStorage; without one they answer 501. A snippet is a zip archive with one entry per file — the shape the editor sends and expects.

builder.Services.AddSingleton<IPlayzorSnippetStorage>(
    new FilePlayzorSnippetStorage(snippetDirectory: "App_Data/snippets",
                                  sampleDirectory: "wwwroot/data"));

FilePlayzorSnippetStorage writes to the local disk. Implement the interface yourself for blob storage, a database or anything else.

Options

builder.Services.AddPlayzorServer(o =>
{
    o.RoutePrefix = "api/playzor";                 // prefix of every route
    o.PackageCacheDuration = TimeSpan.FromDays(365);
    o.AllowedOrigins.Add("https://my-docs.example");  // let another site use this proxy
    o.EnableSnippets = true;
});

AllowedOrigins is empty by default, so the proxy answers same origin requests only. Add * to open it to everyone — worth thinking about, because every package download then runs through your bandwidth.

The other half

Pair this with Playzor.Blazor.Editor in your Blazor app, and point it at these routes:

builder.Services.AddPlayzor();          // default routes, same origin
builder.Services.AddPlayzorHttpSnippetStore();
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

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.1.0 0 9/15/2026
1.0.1 151 8/17/2026
1.0.0 107 8/8/2026