Playzor.UserComponents 1.1.0

dotnet add package Playzor.UserComponents --version 1.1.0
                    
NuGet\Install-Package Playzor.UserComponents -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.UserComponents" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Playzor.UserComponents" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Playzor.UserComponents" />
                    
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.UserComponents --version 1.1.0
                    
#r "nuget: Playzor.UserComponents, 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.UserComponents@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.UserComponents&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Playzor.UserComponents&version=1.1.0
                    
Install as a Cake Tool

Playzor

Playzor.UserComponents

The placeholder assembly a Playzor preview runs.

A playground compiles the user's snippet into an assembly named Try.UserComponents and swaps it in at startup. This package holds the empty stand-in that ships with your app, so the preview has something to load before the first run — and so the compiled snippet has a matching identity to replace.

You only need it in the app that renders the preview, next to Playzor.Blazor.Editor.


<script src="_content/Playzor.Blazor.Editor/js/playzor-preview.js"></script>
<script src="_framework/blazor.webassembly.js" autostart="false"></script>
<script>
  Blazor.start({
    loadBootResource: function (type, name, defaultUri) {
      if (type === 'assembly' && name === 'Try.UserComponents.dll') {
        const bytes = window.Playzor?.CodeExecution?.getUserComponentsDllBytes?.();
        if (bytes && bytes.length) {
          const url = URL.createObjectURL(new Blob([bytes], { type: 'application/octet-stream' }));
          return fetch(url).finally(() => URL.revokeObjectURL(url));
        }
      }
      return defaultUri;
    }
  });
</script>

The snippet declares @page "/__main", so the compiled component simply becomes a route of that app — nothing else has to be registered. Point the editor's CompiledPreviewUrl at it.

Why the name does not match the package

The assembly stays Try.UserComponents: every snippet saved so far declares namespace Try.UserComponents in its .cs files, and the boot hook above swaps by exactly that name. Renaming it would break shared links.

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.

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 42 9/15/2026
1.0.1 172 8/17/2026
1.0.0 108 8/8/2026