Publish
Have you developed an extension for WindowSill and are ready to share it with the world? That's fantastic! Publishing your extension is both simple and free.
Considerations when Release build
WindowSill extensibility is made possible through the Managed Extensibility Framework (MEF). MEF is excellent for desktop applications as it enables an app to dynamically load any .NET class library that implements specific interfaces used by WindowSill for extensibility, without the main WindowSill app needing prior knowledge of your extension.
However, this flexibility comes with a significant caveat. Extensions are discovered through Reflection, which has implications for Release builds:
- Exercise caution when using trimming, as Reflection can be affected by it.
- Native AOT can introduce a lot of complications. It can modify your Class Library such that WindowSill won't locate your components via Reflection. You'll also need to compile and release a distinct binary file for each platform you aim to target (Windows, macOS, Linux).
Unless there's a compelling reason to use AOT and trimming, we advise against using trimming and AOT when building an extensions for WindowSill in Release mode.
Packing an extension
WindowSill extensions should be packaged as NuGet package. When installing an extension through the WindowSill website, the app unpacks the NuGet package and stores it in a directory. WindowSill uses the .nuspec file of the NuGet package (a file containing declarative package information) to display details about the extension in the extension manager, such as its title, description, and version number.
As of today, WindowSill does not automatically verify whether a new version of the extension is available, but this feature may be supported soon.
To create an extension package, start by editing the *.csproj
file you created in the previous steps and add the following:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- NuGet package -->
<Version>1.0.0</Version>
<Title>Title to be displayed on WindowSill extension marketplace</Title>
<Description>A description of my extension to be displayed on WindowSill marketplace.</Description>
<PackageProjectUrl>https://my-website.com</PackageProjectUrl>
<RepositoryUrl>https://github.com/user/repository</RepositoryUrl>
<Authors>my name</Authors>
<PackageIcon>Assets/icon.png</PackageIcon>
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
</PropertyGroup>
<ItemGroup>
<None Include="Assets/icon.png" Pack="true" PackagePath="\Assets\" />
<None Include="LICENSE.md" Pack="true" PackagePath="\" />
</ItemGroup>
</Project>
These project properties will allow the creation of the nuspec file automatically. You can then use the dotnet pack command to generate a .nupkg
file, which is a NuGet Package.
Publishing an extension
There are two ways to share your extension online:
- Publish it on WindowSill marketplace, making your extension available to the world.
- Advantages:
- Your extensions is available to a broad audience
- Users can discover it easily on the WindowSill marketplace or within the app (coming soon...).
- Users can download your extension as a
.wsext
file automatically. - Users can use a one-click-to-install button from the WindowSill marketplace.
- Extensions will be updated automatically (coming soon...) on user's machine
- Disadvantages:
- There's a one-time approval requirement.
- Advantages:
- Publish it to a restricted audience, such as within a company.
- Advantages:
- You can control who get your extension.
- No approval needed.
- Disadvantages:
- No auto update.
- No one-click-to-install button.
- Advantages:
Publish on WindowSill marketplace
There are a few steps to follow.
- Build and pack your extension as a NuGet package (
.nupkg
) in Release mode. - Publish it on nuget.org for free.
- Fork and clone the WindowSill Extensions Manifest repository. Similarly to how WinGet or Chocolatey work, this repository gather a list of allowed extensions that will later-on be deployed on WindowSill marketplace automatically.
- Follow the instruction on the WindowSill Extensions Manifest repostitory to get your extension approved.
- TL;DR: you will need to add your NuGet package ID to a JSON file and open a pull request. A pipeline will then verify the requirements of your NuGet package. Once approved and merged, your extension will appear on the WindowSill marketplace within a few hours. And voilĂ !
Publish without WindowSill marketplace
There are a few steps to follow.
- Build and pack your extension as a NuGet package (
.nupkg
) in Release mode. - Rename the
.nupkg
to be a.wsext
file instead. That's it! You can now share this file the way you wish. Users will need to double-click this file from File Explorer to install it in their WindowSill app.