Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do I References a dll from outside the VS IDE.

0 views
Skip to first unread message

Doug Shepard

unread,
Oct 4, 2001, 9:22:23 PM10/4/01
to
I am trying to make a call to a custom library that I have used many times
before in my VB app's but I am very new to C# and can't figure out how to do
this. If I put the References in the IDE I can new the object and see all
of its components but if I try and run this outside the IDE I get a
"System.IO.FileNotFoundException". I think the reason for this is that it
does not know where to find my custom dll at. If someone could tell me how
to point to my dll in the code I would really appreciate it.

Thx. Dougsh......


Patrick Steele

unread,
Oct 4, 2001, 10:05:53 PM10/4/01
to
In article <Oq6NzwTTBHA.2100@tkmsftngp03> (from Doug Shepard
<Dou...@GeckoTech.com>),

The DLL should be in the same directory as the executable. Are you
having problems running the app outside the IDE or compiling the app
outside the IDE?

--
Patrick Steele

Doug Shepard

unread,
Oct 5, 2001, 1:01:17 PM10/5/01
to
Thanks for the reply Patrick. I tried putting the dll into the same
directory but that did not work.
If I run the console app in the IDE it works, if I run the app outside of
the IDE but in the same directory that it was build in ie \bin\Debug it
works. BUT if I move that exe to any other directory it will give me the
FileNotFoundException.

//Start Sample code:
using System;
using WAVELINKLib;

namespace WaveLinkRFPrint
{
public class SimpleApp
{

static void Main(string[] args)
{
WaveLinkIO ioIface = new WaveLinkIO(); // This line
errors with FileNotFoundException
// ioIface.RFPrint(1,1,"Test OutPut",4);
}
}
}
//End Sample code

Do you have any other thoughts?

Thx. Dougsh.........

"Patrick Steele" <pst...@ipdsolution.com_> wrote in message
news:MPG.1626df884...@msnews.microsoft.com...

Patrick Steele

unread,
Oct 5, 2001, 1:21:55 PM10/5/01
to
In article <OLWib9bTBHA.2040@tkmsftngp05> (from Doug Shepard
<Dou...@GeckoTech.com>),

> Thanks for the reply Patrick. I tried putting the dll into the same
> directory but that did not work.
> If I run the console app in the IDE it works, if I run the app outside of
> the IDE but in the same directory that it was build in ie \bin\Debug it
> works. BUT if I move that exe to any other directory it will give me the
> FileNotFoundException.

When you move the EXE, are you moving the DLL that holds the
"WAVELINKLib" namespace as well?

--
Patrick Steele

Doug Shepard

unread,
Oct 5, 2001, 1:25:23 PM10/5/01
to
Yes, I have keep the EXE and the DLL together at all times.


"Patrick Steele" <pst...@ipdsolution.com_> wrote in message

news:MPG.1627b63a4...@msnews.microsoft.com...

Doug Shepard

unread,
Oct 5, 2001, 6:30:56 PM10/5/01
to
OK I got it to work. What the problem was that the IDE created a wrapper
around my COM DLL and called it Interop.WAVELINKLib_1_0.dll Original name
was WAVELINKLib.dll . This wrapper needs to fallow the EXE. What I think
is happening is that my app calls the wrapper and then the wrapper call my
COM DLL. Then everything works just fine.

Thanks for your help.
Dougsh........


"Doug Shepard" <Dou...@GeckoTech.com> wrote in message
news:Oq6NzwTTBHA.2100@tkmsftngp03...

0 new messages