Adding a Reference to a CS-Script in Notepad++

3.4k Views Asked by At

I'm having reasonable results using CS-Script in Notepad++ (I can create, edit, run and debug basic C# scripts), but I must be missing something because I can't find a way to add References to the Script Project window.

For example, when I select "Load script from Current Document" it does a good job of loading the usual References (System.dll, System.Data.dll, etc.) however if I'm including a custom library that I've written myself (e.g. "using MyCompany.Library.EmailHelper") then I'm not seeing the DLL containing that library in the References list in the CS-Script Project window (and hence I can't get any intellisense for the classes in the library).

Without the reference, when I try to build the CS script I get numerous The type or namespace name '…' could not be found (are you missing a using directive or an assembly reference?) errors in the Notepad++ output window.

Unless I'm missing something obvious I can't see how I can manually add references via the CS-Script UI provided in Notepad++.

1

There are 1 best solutions below

2
guestx On BEST ANSWER

Put all neccesary dll files within cs file directory.

On top of the file write

//css_args /ac

Then below that in the first using write

using dllName; without dll extension.

It should work.