Skip to content

Latest commit

 

History

History
59 lines (40 loc) · 2.66 KB

README.mkd

File metadata and controls

59 lines (40 loc) · 2.66 KB

⚠️ Native DLLs built from this project are currently unstable ⚠️

Npp.DotNet.Plugin.Gui.Demo

A demonstration of a native plugin built with the .NET SDK, using Windows Forms

Requirements

Install the tools listed in the general build requirements.

Building

Launch the Visual Studio Developer Command Prompt or PowerShell from the Windows Start Menu.

Change into the same directory as this README and run:

dotnet publish -f net9.0-windows -c $(BUILD_CONFIGURATION) -r $(TARGET_RUNTIME) -o $(PLUGIN_FOLDER_PATH)

The command line arguments are the following:

$(BUILD_CONFIGURATION) Release OR Debug
$(TARGET_RUNTIME) win-x64 OR win-arm64
$(PLUGIN_FOLDER_PATH) the full path to the plugin folder created above

Running the plugin

Caution

Executing the plugin's "Dockable Dialog Demo" command will crash Notepad++:

GUI plugin menu

If you would like to help further the development of Native AOT plugins, choose "Debug" for the $(BUILD_CONFIGURATION) above. Start a portable Notepad++ with a debugger attached (e.g. the Visual Studio Windows Debugger), and watch the output window for a stacktrace similar to the following:

Unhandled exception. System.Globalization.CultureNotFoundException: Only the invariant culture is supported in globalization-invariant mode. See https://aka.ms/GlobalizationInvariantMode for more information. (Parameter 'name')
zh-Hant is an invalid culture identifier.
   at System.Globalization.CultureInfo..ctor(String name, Boolean useUserOverride) + 0x81
   at System.Reflection.AssemblyName.set_CultureName(String) + 0x36
   at System.Reflection.RuntimeAssemblyName.CopyToAssemblyName(AssemblyName) + 0x3c
   at System.Reflection.Runtime.Assemblies.RuntimeAssemblyInfo.GetName() + 0x33
   at System.Windows.Forms.ThreadExceptionDialog..ctor(Exception) + 0x7ea
   at System.Windows.Forms.Application.ThreadContext.OnThreadException(Exception) + 0x94
   at System.Windows.Forms.NativeWindow.Callback(HWND, MessageId, WPARAM, LPARAM) + 0xef
   at Npp.DotNet.Plugin.Gui.Demo!<BaseAddress>+0x4ba9ea