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.
-
Visual Studio, 2022 edition or later. If you are not going to use the IDE, installing the Visual Studio Build Tools can save disk space
-
the .NET SDK, version 8.0.100 or later, installed by selecting the .NET Desktop Development workload from the Visual Studio Installer
-
the Visual C++ build tools and development libraries, installed by selecting the Desktop Development with C++ workload from the Visual Studio Installer. Make sure to install the SDKs for both x86_64 and ARM64 targets
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.
Double-click the solution file at the root of the source tree.
Exapand the "examples" subfolder in the Solution Explorer.
Activate one of the *.Demo
projects by clicking on it.
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
:
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:
To start a build, click the Publish button.
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.
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.
Except where noted, the source code of Npp.DotNet.Plugin is distributed under the terms of the Apache License, Version 2.0.
This README and all other documentation, including images, are distributed under a CC0 v1.0 Public Domain Dedication.