oleg-shilo / cs-script.npp

CS-Script (C# Intellisense) plugin for Notepad++ (x86/x64)
MIT License
246 stars 52 forks source link

This ANSI plugin is not compatable with your Unicode Notepad++ v7.5.9 x32 #28

Closed AntonDevil closed 7 months ago

AntonDevil commented 5 years ago

Hey folks.

So after the update of Notepad++ x32 from v7.5.8 to v7.5.9 CS Script plugin is failing to start (right at Notepad++ startup).

Error message is:

This ANSI plugin is not compatible with your Unicode Notepad++.

CSScriptNpp.dll is not compatible with the current version of Notepad++.

Do you want to remove this plugin from the plugins directory to prevent this message from the next launch?
oleg-shilo commented 5 years ago

Lately Notepad++ hosting model changes are constantly upsetting various plugins. I suggest you remove the plugin completely in install it manually from the releases page: https://github.com/oleg-shilo/cs-script.npp/releases

AntonDevil commented 5 years ago

I tried with CSScriptNpp.1.7.19.0.x86.zip (I don't want to install it with msi) No luck.

Am I the only one with this issue?

BTW. the title of an error is "C:\Program Files (x86)\Notepad++\plugins\CSScriptNpp\CSScriptNpp.dll" File structure is:

plugins\
--CSScriptNpp\
----CSScriptNpp.dll
----...
--CSScriptNpp.dll
--...

I even tried to procmon it. Here is few things I noticed. Take a look how notepad++ load dlls. It is testing directory and then he is trying to go into the directory and open .dll file. Then he is getting back from the directory and he is trying to loading main dll. Maybe this is an issue? .net dll is getting load before managed dll?

image

And then this is happening (this is right before errors message showed up)

image

oleg-shilo commented 5 years ago

Yes it is a problem. I remember it very well. It is caused by the recent experiments by NPP team :( Many other plugins are affected as well.

Though the problem was reported and definitely fixed. May be it came back.

Anyway, asking Npp team to fix something, particularly plugin hosting is very problematic. I can only suggest you switch to x64 version. It definitely works. Though I have v7.5.8.

oleg-shilo commented 5 years ago

OK updated to 7.5.9 and.... the update broke it :o(

Though it pops up the error message but the plugin itself is not affected and works as expected.

I am so happy for Npp team that they enjoy themselves. They constantly break the hosting model that was stable for ~10 years. Plugin manager (which is just another plugin) team has also been complaining about this.

Will need to come up with the work around this week...

oleg-shilo commented 5 years ago

OK as a quick manual work around (until I release the change) you may move the whole plugin file structure one level down to handle the breaking change from NPP.

Current structure:

Notepad++
  \-- plugins
      |-- CSScriptNpp
      |      |-- CSScriptNpp.dll (managed)
      |      |-- CSScriptLibrary.dll
      |      |-- . . .
      |
      \-- CSScriptLibrary.dll (native)

Work around structure: Current structure:

Notepad++
  \-- plugins
        \-- CSScriptNpp
              |-- CSScriptNpp
              |      |-- CSScriptNpp.dll (managed)
              |      |-- CSScriptLibrary.dll
              |      |-- . . .
              |
              \-- CSScriptLibrary.dll (native)
AntonDevil commented 5 years ago

Thank you, Oleg!

I just wanted you to be aware about this issue with recent notepad++ update. My notepad++ is always running, so I'm not getting annoyed with this =).

You can close this issue, if you wish.

Regards, Anton

P.S.: Всегда приятно видеть наших владеющих и поддерживающих проекты, которыми пользуются многие другие разработчики. Успехов! =)

oleg-shilo commented 5 years ago

Thanks Anton,

No I am not closing it. I is a problem and I have very little hope that Npp will fix this mess. So I will need to change my deployment model. I simply cannot say to CS-Script users what Npp says to the plugin devs - "Deal with it!"

Успехов!

Thanks, my Russian typing is rusty but I can read :)

oleg-shilo commented 5 years ago

Done. You can oick the latest release with the work around from here: https://github.com/oleg-shilo/cs-script.npp/releases/tag/v1.7.20.0