NPP.net Template and 3rd Party Libraries
-
Hi everyone
I stumbled upon https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net and downloaded the current template, kicked off a program, build to Notepad++ and it worked fine. Really great first impression.
Then, I wanted to add some 3rd Party libraries, which I added via NuGet. Everything is usable and everything is fine. When building and exporting, the .dll is extra to my plugin of course.
So, with a hint by kblisted, I used ILMerge, especially the MSBuild task, avaialable via NuGet and had a merged .dll. All good. But copying that one to Notepad++ fires the program with a message that the plugin is incompatible.
No matter what I set up I wasn’t able to get it to work. What I did was using this template, building a new project and just calling one method in the library from the ‘OnNotification’ method.
Without ILMerge NPP crashes with an error (of course). With ILmerge Notepad++ states the plugin is incompatible. Without the dependency, all is fine.Noting: Cloning the repo source of the library used and adding and calling it directly in my project works fine. So the guess is something during the merge process or dynamic loading is failing.
Has anybody made experience with adding 3rd Party libraries here? Am I missing something (I probably am ^^’ but cannot see it right now)?
Any help or pointing in a direction is appreciated.
Thanks a lot in advance
-
Hi
Maybe as addition if someone else is looking into this: works with .NET Framework 4.0 and above. Just ILMerge .net 3.5 and below won’t work. There are many topics around this, but no solution helped me (or I was just too dumb ^^').
Cheers