GAC and namespaces

  • Thread starter Thread starter Neil
  • Start date Start date
N

Neil

Hey,

Quick question - do you *have* to use namespaces if you intend on
putting an assembly in the GAC?

We're looking at a small project to move ASP.NET 2.0 web project code
files in the App_Code folder into an assembly for deployment to the
GAC.

There was no default namespace when these classes were created and
adding one would mean I'd have to update code in my web project,
(which for reasons I'll not go into would be a long-winded process) -
but I'm concerned that without a namespace there could be conflicts
with other assemblies in the GAC?

I have tested on my dev machine and the web site runs normally using
the new DLL in the GAC, but is this just luck that there are no other
type names that conflict with mine?

Any pointers appreciated.


Neil
 
Hey,

Quick question - do you *have* to use namespaces if you intend on
putting an assembly in the GAC?

We're looking at a small project to move ASP.NET 2.0 web project code
files in the App_Code folder into an assembly for deployment to the
GAC.

There was no default namespace when these classes were created and
adding one would mean I'd have to update code in my web project,
(which for reasons I'll not go into would be a long-winded process) -
but I'm concerned that without a namespace there could be conflicts
with other assemblies in the GAC?

I have tested on my dev machine and the web site runs normally using
the new DLL in the GAC, but is this just luck that there are no other
type names that conflict with mine?

Any pointers appreciated.

Neil

Further testing revealed that my suspicions where correct and an "The
type '...' is ambiguous" error occured when two assemblies in the GAC
use the same type name.

Thanks
 
Back
Top