Table of Contents

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:

  1. Exercise caution when using trimming, as Reflection can be affected by it.
  2. 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 x64, Windows arm64, etc).

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.

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.

Changelogs

When publishing your extension on the WindowSill marketplace, you can optionally decide to display changelogs in the "What's new" section (example).

To do this, it is very simple:

  1. Add a Changelog.md or Changelogs.md file anywhere in your project.
  2. Make sure the file is packed with the NuGet package. You may need to add a line like the following to your CSPROJ: <None Include="CHANGELOGS.md" Pack="true" PackagePath="\" />
  3. Write your changelog into the file you created, using Markdown syntax.

WindowSill and the website will automatically detect this file and display it within the app and the marketplace.

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.
      • Changelogs are nicely displayed on the marketplace.
      • Extensions will be updated automatically on user's machine
    • Disadvantages:
      • There's a one-time approval requirement.
  • 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.

Publish on WindowSill marketplace

There are a few steps to follow.

  1. Build and pack your extension as a NuGet package (.nupkg) in Release mode.
  2. Publish it on nuget.org for free.
  3. 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.
  4. Follow the instruction on the WindowSill Extensions Manifest repostitory to get your extension approved.
    1. 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.

  1. Build and pack your extension as a NuGet package (.nupkg) in Release mode.
  2. 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.

Updating

You published an extension? Congratulations! When you need to deploy an update, it's fairly simple. There are 2 paths possible:

  1. If your extension was published on WindowSill marketplace, simply increase the version number in your .csproj, build, and push the updated NuGet package to nuget.org. Within a few hours, it will be automatically displayed on WindowSill marketplace and the WindowSill app will automatically notify users who previously installed your extension that an update is available.
  2. If your extension was published without WindowSill marketplace, you will need to share the .wsext to your audience. Ask them to uninstall your extension (in the settings) and double-click the newer .wsext file from File Explorer.