oleg-shilo / cs-script.npp

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

Auto-completion is not working for a custom dll's object #34

Closed sadasd1 closed 7 months ago

sadasd1 commented 5 years ago

Hi, I am trying to use my c# .NET dlls in my cs script and instantiating object for them. The problem I see is for one of my object, not able to see auto completion. For details in this page As per the suggestion in the above link, I disabled autocompletion feature of notepad++ but still facing the same issue, it is even worse that auto completion is not working for local variables .

Thanks.

oleg-shilo commented 5 years ago

OK then. The problem is either with the plugin not being deployed correctly or with the script. Let's start with the simple one. Can you share your script and the dependency assemblies? Either the real one or you can create an equivalent that demonstrates the problem.

sadasd1 commented 5 years ago

I do get the autocompletion for my dlls after I replaced the debug version of it by its release version. But now I have found another issue, one of my dll name is xxxx.yy whereas it's namespace is xxxx. In notepad++, it doesn't accept my dll saying it doesn't have yy in the dll. Is there any restriction on the name of the dll for this plugin. The workaround what I did was I faked a dll with xxxx and kept the actual dll which is xxxx.yy in the same folder.

oleg-shilo commented 5 years ago

Yes there is kind of a restriction.

When you are placing using MyUtil;, CS-Script (the engine behind script execution) tries to locate the assembly 'MyUtil.dll' or 'MyUtil.exe'. In your case it cannot be found.

This means that you need to reference the assembly explicitly with the engine reference directive:

//css_ref myutil.whatever.dll
using System;
...