Robert Lawson

Robert Lawson

  • NA
  • 3
  • 1.6k

Getting C# to recognize a dll outside of Visual Studio.

Jun 28 2012 4:09 PM
Several years before I started working at this job another developer who is no longer here wrote an application in classic ASP using HTML, vbscript and javascript.  This is fine but the problem is that 2 pages were written in C# with an HTML file and a code behind file.  There was no solution files for these two pages.  They may have been originally created in Visual Studio but they don't exist in it now.

That is important because there is a lot of things that Visual Studio just does for you without even thinking.

My problem is that in these two C# pages I need to get them to reference a DLL.  This is a simple task when using Visual Studio.  You just add a reference to the project and life is good.  But outside of VS nothing seems to work.

I tried putting the dll in the same folder as the pages and then I tried the following:
Using myDLL; 
myDLL dll = new myDLL(); 
myDLL dll = myDLL();

I found some code online that said to create an internal static class and use [DLLImport()] but that didn't work either.

Outside of having to rewrite these pages in vbscript (which I don't have the time to do) I am at a loss.

Has anyone ran into this problem before?  Is there something that I can put in the web.Config?  Or is this just impossible and I am hosed.

BTW this is all running under the 2.0 .net framework.

Thanks,
Robert

Answers (2)