Releases: oleg-shilo/scripts.npp
Release 2.0.0.0
Overview
This is the first release with x64/x86 support.
It's been a difficult journey. The original CLR hosting solution has not been abandoned by their authors leaving no chance for plugin authors to port their CLR plugins to x64 Notepad++.
On top of this Notepad++ team has been constantly changing the plugin deployment model showing very little consideration to the army of plugins developers. :(
Though things started looking a bit better.
Thnks Kasper B. Graversen, who released rather brilliant port of the original hosting solution: https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net.
NppScripts (scripts.npp) is based on his codebase + some defect fixes and minor improvements.
Hints and tips
Go through the samples library to see the all possible use-cases fro C# scripting Notepad++ automation.
If you broke your script samples you can always restore them from the about box with the "restore samples" button.
Install CS-Script plugin so you can use Intellisense when developing your scripts:

Always create your starting script with the script manager. It will ensure you the all require references and inclusions:

Limitations
- The plugin is not yet available from the "Plugins Admin" yet.
- This is a beta release and it has not been properly tested on x86 Notepad++
- The documentation is yet tol be published in a week or so
Legacy (x86) Releases
Merge pull request #1 from chcg/appveyor_x64
appveyor + x64
Thank you. Though the approach for the x64 build in this case is to be changed very soon.
I have just finished yesterday the CS-Script.Npp x64 migration. Only a single outstanding item left (I may need to contact @kbilsted for that).
It was quite interesting dev effort. @kbilsted has done fantastic job of capturing native Npp interface. In many cases his interface was better than that one that I prepared for CSScriptNpp and CSScriptIntellisense. Thus I have changed the codebase to use his API.
Though there were a few critical defects that made the current Kbg.NppPluginNET solution actually unsuitable for hosting any comprehensive plugins. For example calling `GetOpenedFiles` crashes the Npp 100% reliably. I will be preparing the pull request with my fixes so @kbilsted can benefit from this effort as well.
Another very beneficial outcome of this exercise is that I have extended Kbg.NppPluginNET original solution (VS project template) and now building the plugin can be done without exporting the plugin assembly. This makes it possible to have a single-assembly AnyCPU plugin implementation possible. And the x86 vs x64 plugin hosting is the result of a simple packaging technique:
Kbg.NppPluginNET solution is just two files:
- NppPlugin.Host.dll (compiuled for x86)
- NppPlugin.Host.dll (compiuled for x64)
Npp plugin solution:
- 'MyPlugin' VS project (compiled for AnyCPU and referencing any of two NppPlugin.Host.dll)
- _Any other dependencies_
Npp plugin packaging/deployment:
```
<x86 ProgramFiles on x64 Windows>
─ Program Files (x86)
└─ Notepad++
├─ plugins
├─ MyPlugin
| └─ MyPlugin.dll <AnyCPU assembly>
└─ MyPlugin.x86.dll <renamed x86 version of NppPlugin.Host.dll>
************************
<x64 ProgramFiles on x64 Windows>
─ Program Files
└─ Notepad++
├─ plugins
├─ MyPlugin
| └─ MyPlugin.dll <AnyCPU assembly>
└─ MyPlugin.x64.dll <renamed x64 version of NppPlugin.Host.dll>
```
I will also be contributing NppPlugin.Host to the kbilsted/NotepadPlusPlusPluginPack.Net