By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,170 Members | 1,360 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,170 IT Pros & Developers. It's quick & easy.

namespace DLL problem

P: n/a
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 ?
Mar 28 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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
Mar 28 '06 #2

P: n/a
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

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Steph" <pi**@pipo.com> wrote in message
news:44***********************@news.wanadoo.fr...
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 ?

Mar 28 '06 #3

P: n/a
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/as...deployment.asp

Mar 28 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.