Windows 7 x64 - not working

Aug 21, 2013 at 3:07 PM
I have been able to install the binaries under Windows XP SP3 x86 and everything seems to work well.

But under Windows 7 x64 I get "Unknown exception" when Notepad++ opens and this tool does not appear o the plugins menu.

I guess that one or other of dll's have not been built for "Any CPU"?
Coordinator
Aug 22, 2013 at 4:36 AM
Edited Aug 22, 2013 at 4:41 AM
Correct, the plugin is built for x86 only. This is because the host app Notepad++ is the x86 application (at least v6.4.3).
The host OS CPU architecture should not matter. I am using the x86 Notepad++ with the x86 plugin on my Win8 x64.

Most likely there is some incompatibility with the .NET runtime. The plugin requires .NET v4.0 or higher. Can you check please what is the .NET version you have.

Txs
Aug 22, 2013 at 1:52 PM
I seem to be having the same problem as Kevin under Win8 Enterprise x64. Getting "unknown exception" as soon as the editor loads and no menus/toolbars as described. According to regedit I have the following .Net frameworks installed:
.Net 2.0.50727
.Net 3.0
.Net 3.5
.Net 4 (I think this is the .Net4.5 sdk)
.Net 4.0

FYI, I'm using Notepad++ v6.3 (03-Feb-2013) because I'm too lazy to update it :)
Aug 22, 2013 at 1:56 PM
Just updated to Notepad++ v6.4.5, still have this issue.
Coordinator
Aug 22, 2013 at 1:59 PM
The unknown exception is popped up by Notepad++ and without the debugger it is hard to tel what is it exactly.
I am away for the next 5 days so I will be able to investigate it further only the next week. I will try to run it on the fresh Win 8 (I hope I will find one quickly) .

Oleg Shilo
--------------------------------------------------------------------------------------------
Internet: http://www.csscript.net
E-Mail: [email removed]


Coordinator
Aug 22, 2013 at 2:05 PM
Could you check and ensure you do not have the prev. version of CSScriptIntellisense.dll installed. Just in case it conflicts..
Coordinator
Aug 22, 2013 at 2:33 PM
Just another thing before I go. Please check if Windows blocked the assembly because it is downloaded from the Internet. This "security" feature can even penetrate through the zip files content.
Aug 22, 2013 at 5:18 PM
Unblocking the various dll's seems to have done the trick. Many thanks.

The combination of csscript and csscriptintellisense looks to be very powerful!
Apr 17, 2014 at 5:46 PM
Just curious what the process is to 'unblock' the dlls, and which ones you are talking about? I'm having the same issue ('unknown exception' error on launch in Win 7 64), so have just moved the dll and folder to the disabled folder until I find a fix for this. Specific steps to fix would be appreciated. Thanks!
Apr 17, 2014 at 6:52 PM
Frankly I can't precisely remember - on either count.

If you go to the installation folder for Notepad++ in Windows Explorer and then into the plugins subdirectory you will find at least one dll that relates to CS-Script. Right click on it and select properties. Then explore the various settings eg the "Security" tab or one of the "Advanced" buttons. Somewhere you will find a setting that makes clear that the dll is blocked for execution.

Maybe someone will be along later with more precise info that I've been able to remember.
Coordinator
Apr 17, 2014 at 10:50 PM
The location of the CS-Script.Npp binaries are in 'C:\Program Files (x86)\Notepad++\plugins' and 'C:\Program Files (x86)\Notepad++\plugins\CSScriptNpp'.

If you prefer you can just download the CSScriptNpp.1.0.22.0.7z and extract the content into 'C:\Program Files (x86)\Notepad++\plugins' folder. This is what MSI does.
Aug 28, 2014 at 4:13 PM
Edited Aug 28, 2014 at 4:14 PM
I have this problem too.
When I click the CS-Script.Npp icon in Notepad++ or trying to open project panel or run the script, a messgebox will show:
PluginManager::runPluginCommand Exception
Unknown exception
I'm using Notepad++ v6.6.8 and CS-Script.Npp v1.0.31.0 and Win7 x64 (I don't think Windows blocked the assembly).
I can open the Output Panel and Debug Panel (when trying to debug I got a System.NullReferenceException), but can't open Project Panel. So the plugin can't be used.
Intellisense still works and cs-script can run correctly without using Notepad++. I reinstalled Notepad++ and CS-Script.Npp but still have this problem.
Coordinator
Aug 29, 2014 at 12:55 AM
Can you please verify that you have the following file structure:
plugins\CSScriptNpp.dll
plugins\CSScriptNpp\7z.dll
plugins\CSScriptNpp\7z.exe
plugins\CSScriptNpp\cscs.exe
plugins\CSScriptNpp\cscs.v3.5.exe
plugins\CSScriptNpp\CSScriptIntellisense.dll
plugins\CSScriptNpp\CSScriptLibrary.dll
plugins\CSScriptNpp\css_dbg.exe
plugins\CSScriptNpp\css_dbg.pdb
plugins\CSScriptNpp\csws.exe
plugins\CSScriptNpp\ICSharpCode.NRefactory.CSharp.dll
plugins\CSScriptNpp\ICSharpCode.NRefactory.dll
plugins\CSScriptNpp\Mono.Cecil.dll
plugins\CSScriptNpp\npp_jit.exe
plugins\CSScriptNpp\Updater.exe
plugins\CSScriptNpp\Mdbg\corapi.dll
plugins\CSScriptNpp\Mdbg\enc.dll
plugins\CSScriptNpp\Mdbg\mdbg.exe
plugins\CSScriptNpp\Mdbg\mdbgeng.dll
plugins\CSScriptNpp\Mdbg\mdbgext.dll
plugins\CSScriptNpp\Mdbg\mdbghost_32.exe
plugins\CSScriptNpp\Mdbg\mdbghost_64.exe
plugins\CSScriptNpp\Mdbg\NativeDebugWrappers.dll
plugins\CSScriptNpp\Mdbg\npp.dll
plugins\CSScriptNpp\Mdbg\raw.dll

and the all files are unblocked.

If this does not help can you please check if early versions do work for you (e.g. default version from PluginManager).

Thank you
Aug 29, 2014 at 12:11 PM
Edited Aug 29, 2014 at 12:12 PM
Thanks for the quick reply as usual.

I have all the files and they are not blocked. I uninstalled my Notepad++ and then installed old Notepad++(v6.3) and old plugin(1.0.27.0). Problem still exists. That's strange because a few months ago I could still use CSScriptNpp. I think during these months I just uninstalled VS2010 and installed VS2013.
Coordinator
Aug 30, 2014 at 12:52 AM
The good (kind of) thing is that it means that there is nothing wrong with the plugin as such but rather with the deployment or environment.

The bad thing is that there is nothing more that can be done just by analysis of the symptoms. I really want to get to the bottom of this but my possibilities are limited without any debugging.

You do have VS2013. Is it possible for you to try a simple debugging exercise? And if indeed it is then please just download the code and do the following simple steps:
  • Uncomment Assert line in the CSScriptNpp.UnmanagedExports.setInfo.
  • Compile as Debug
  • In Solution->SolutionItems right-click and run "CopyDebugToNpp.cmd"
That is it. Now if you start NPP the assertion will pop-up the Assert dialog and you will be able to attach the debugger (VS2013). And after that you will be able to see who exactly throws the exception.

Thanking in advance,
Oleg
Aug 30, 2014 at 6:15 AM
Thanks again.

But Notepad++ refused the plugin compiled by myself, no matter that Assert line is comment or not. When Notepad++ start, it directly show a messagebox:
Exception
Unknown exception
and the plugin wouldn't be loaded. (and can't attach to VS)
Since I can open debug panel and output panel, I believe the issue comes from project panel. But seems there is nothing we can do with my "special" environment. :(

by the way, CSScriptNpp\Dialogs\LocalsPanel.resx is missing, although it doesn't matter much, I guess.
Coordinator
Aug 30, 2014 at 8:45 AM
OK. We are getting somewhere.

If you have no LocalsPanel.resx then you cannot build. If you cannot build then you cannot fully deploy the binaries for debugging. Most likely when you executed CopyDebugToNpp.cmd there were errors reported.
I just committed LocalsPanel.resx and now you will be able to build and debug. When deploying ensure that you are building Debug and running CopyDebugToNpp.cmd.

Don't give up. :o) "special environment" doesn't necessarily mean "invalid environment". Quite possible there is some flaw in the plugin that only exercised on your environment and then it needs to be fixed.

>Since I can open debug panel and output panel...
This is actually very good. The Debug and Output panel cannot be present in Npp unless plugin is loaded. Meaning the plugin can be loaded, It's just matter of understanding why project panel cannot be loaded.
Coordinator
Aug 30, 2014 at 8:49 AM
OK. We are getting somewhere.

If you have no LocalsPanel.resx then you cannot build. If you cannot build then you cannot fully deploy the binaries for debugging. Most likely when you executed CopyDebugToNpp.cmd there were errors reported.
I just committed LocalsPanel.resx and now you will be able to build and debug. When deploying ensure that you are building Debug and running CopyDebugToNpp.cmd.

Don't give up. :o) "special environment" doesn't necessarily mean "invalid environment". Quite possible there is some flaw in the plugin that only exercised on your environment and then it needs to be fixed.
Since I can open debug panel and output panel...
This is actually very good. The Debug and Output panel cannot be present in Npp unless plugin is loaded. Meaning the plugin can be loaded, It's just matter of understanding why project panel cannot be loaded.
Aug 31, 2014 at 2:49 PM
Yes, the LocalsPanel.resx is missing and I used other form's resx file to replace it and finished the compilation that day.
I get the newest code now and...
issue still just like last time. No metter I comment that line or not I will get a "Unknown exception" messagebox (just a messagebox, unable to attach the debugger) when Notepad++ start. Then Notepad++ will run without that plugin.

I'm sorry to get you confused, when I say "I can open debug panel and output panel" I am using your release version.
Actually Notepad++ can't load the plugin compiled by me at all. Although it was compiled successfully with no error.
Coordinator
Sep 1, 2014 at 4:44 AM
I'm sorry to get you confused, when I say "I can open debug panel and output panel" I am using your release version.
Yes. I actually guessed that.
Actually Notepad++ can't load the plugin compiled by me at all. Although it was compiled successfully with no error.
Unfortunately this means that either compiling or deploying went wrong.

You still can do certain things to investigate it. You can get the source of the version that can be loaded build and then see if the binaries are different comparing to the officially released ones. After that see if the deployment (file structure) is the same in both cases (downloaded and compiled binaries)

But of course it takes time and it will all depends on how much you want to spend with it.

One thing that can be done easy is that you can try to use the plugin on another PC.

Cheers,
Oleg
Oct 1, 2014 at 7:45 AM
After these days struggling, I finally fingured it out.
I guess it's caused by some unknown errors during VS uninstallation & installation.
Actually I just found the solution accidentally. I met another strange issue when I'm using Python Tools for VS (PTVS). I couldn't create a project, VS told me "Visual Studio does not have permissions to read the template information from the system registry. This is often caused by registry permissions problems."
Following advice from this post, I resetted all registry permissions. Then all things go correctly. PTVS works, and CsScriptNpp works too.
Coordinator
Oct 1, 2014 at 8:27 AM
Thank you very much for letting me know. I hope your experience will help other users to avoid your pain :)