Global Assembly

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

Hi all

What is the way in .NET to make an Assembly global for all other assemblies
that reference it? In VB6 there was a property on a DLL called Instancing,
and if you set it to 6 - GlobalMultiUse, then you don't have to declare an
object in order to call it's functions, the other DLL's could simply call
the functions directly.

What I want to do is have a User's class in an Assembly, and the properties
and methods of that class can be called by any other Assembly that is
referencing it. For example: 'Dim myCurrentUser As String = CurrentUser'
where CurrentUser is a property of the user class in the global Assembly.

Kind Regards,
Steve.
 
The rough equivalent would be a class (or type) that is not contained in a
namespace. That is, the class is not declared inside a namespace.

I wouldn't recommend this, since you can add reference the namespace in your
source code and then just use the class as you describe, but you can
dispense with the namespace if you want.

VB projects have a "default" namespace at the project level - you'll have to
remove it from the project properties in order to make that work.
 
Back
Top