How do I reference a DLL in a .net script without Visual Studio

2.8k Views Asked by At

How do I reference a DLL in a C# script? I'm not using Visual Studio, I'm just using NPP with a C# plugin to write a quick one file script. That script needs to reference a third party DLL. Is there a code snippet that I can include to accomplish this?

The DLL I want to reference is for iTextSharp

2

There are 2 best solutions below

4
On BEST ANSWER

Now we know the plugin you're using, it's easy. Just read the documentation on "Using .NET assemblies". In particular, it sounds like you want:

//css_reference iTextSharp.dll;

That's assuming the library is one of the locations CSScript can find automatically - read the linked documentation for more information and options.

4
On

You can load the assembly dynamically from a file

Assembly.LoadFrom("iTextSharp.dll");