Skip to content

[WORK IN PROGRESS] AOT-ready port of the .NET Framework plugin template for Notepad++

Notifications You must be signed in to change notification settings

npp-dotnet/Npp.DotNet.Plugin

Repository files navigation

work in progress

Build Status

What's in here

This project is a tentative demonstration of the .NET SDK as a potential toolchain for Notepad++ plugin development. More concretely, it's a Windows-focused experiment with the Native AOT publish-time option introduced in .NET 7.

Since Native AOT does not support 32-bit runtimes, only 64-bit targets will be supported.

Requirements

Development

Note

Native AOT applies to the dotnet publish workflow. Under any configuration, running dotnet build generates .NET assemblies, useful only for validating the code or project configuration.

A refactored version of K. B. Graversen and Mark Olson's plugin class library is built from the project under the lib subtree. Building any of the companion projects in this repository will build the library automatically.

A functional plugin demo can be built from the project under the examples/minimal subtree.

The demo project's output can be validated by running the test project under the test subtree.

An experimental, non-functioning plugin can be built from the project under the examples/gui subtree. See the known issues to learn more.

Using Visual Studio

Demo plugins

Double-click the solution file at the root of the source tree.

Activate one of the *.Demo projects by clicking on it in the Solution Explorer.

Select "Build" from the main menu, then "Publish Selection". Alternatively, right-click on a *.Demo project and select "Publish..." from the context menu.

Default profiles have been provided for the x64 and ARM64 runtimes. To change the default profile, click the button beside the current profile's file name, e.g., FolderProfile.pubxml:


Select a Publish Profile


A profile can also be configured using the IDE's edit controls. For example, to have the native DLL written directly to the plugin load path of a Notepad++ installation, set the "Target location" to the load path's directory:


Configure Target Location


To start a build, click the Publish button.

Tests

Exapand the "test" subfolder in the Solution Explorer.

Activate a test project by clicking on it (e.g. Memory).

Select "Build" and "Build $(PROJECT)" from the main menu, or right-click on the project name in the Solution Explorer and select "Build" from the context menu.

Select "Test" and "Run All Tests" from the main menu, or right-click on the project name in the Solution Explorer and select "Run Tests" from the context menu.

Using the dotnet CLI

Instructions are in the README of each demo project.

For the basic working demo and test application, see examples/minimal/README.mkd.

For the experimental demo, see examples/gui/README.mkd.

Licence

Except where noted, the source code of Npp.DotNet.Plugin is distributed under the terms of the Apache License, Version 2.0.

The original source code of the Npp.DotNet.Plugin.SettingsBase class and the Npp.DotNet.Plugin.Winforms.SettingsDialog class is distributed under additional licensing terms.

This README and all other documentation, including images, are distributed under a CC0 v1.0 Public Domain Dedication.

About

[WORK IN PROGRESS] AOT-ready port of the .NET Framework plugin template for Notepad++

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published