namespace DLL problem

S

Steph

hello,
i compil my c# program into a DLL.
next i install it into my framework directory :
c:/windows/Microsoft.NET/myframework.../MyDll.dll
but... when i want use it with "unsing MyDll.dll" i obtain this error :
CS0246: The type or namespace name 'MyDll' could not be found (are you
missing a using directive or an assembly reference?)

Where must i install it ?
 
V

Vadym Stetsyak

Hello, Steph!

S> hello,
S> i compil my c# program into a DLL.
S> next i install it into my framework directory :
S> c:/windows/Microsoft.NET/myframework.../MyDll.dll
S> but... when i want use it with "unsing MyDll.dll" i obtain this error :
S> CS0246: The type or namespace name 'MyDll' could not be found (are you
S> missing a using directive or an assembly reference?)

S> Where must i install it ?

If you use Visual Studio IDE, you can select references forlder then select add reference and finally select the assembly you want to reference.

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

Why are you copying it into the framework directory?
I think it;s better to install it in the GAC.

You also need to add a reference to it in your project
 
M

Michael.Suarez

It doesn't "need" to be installed anywhere.

All that needs to be done is add a reference to the dll by right
clicking references, selecting add reference, and locating the dll on
your hard drive. VS will then make a local copy of this dll in its bin
folder.

You CAN install it in the gac if you WANT... but unless you have a
reason to (reasons being the dll will be shared among many
applications, and as it evolves it may break compatability), i dont see
a reason to bother.

This might be a good thing for you to read:
http://www.codeproject.com/dotnet/assemblydeployment.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top