473,386 Members | 1,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Global Assembly

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.

Jul 21 '05 #1
1 1231
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.
--
Klaus H. Probst, MVP
http://www.vbbox.com/
"Steve" <stevea@centurion-ms_RemoveThis_.co.uk> wrote in message
news:uB*************@TK2MSFTNGP10.phx.gbl...
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.

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Abdessamad Belangour | last post by:
Hi all, and thanks for previous answers (especially Nicholas Paldino) An assembly is composed of a set of modules. The module class has a method for reading global methods GetMethods(). My...
3
by: DDE | last post by:
Hi everybody, I developed an assembly common to all my Web Services, so I registered it and put it in the Global Assembly Cache. Now, I modified this assembly, but cannot succed to have this new...
4
by: anders | last post by:
I already asked this question in the VB.NET group but as C# seems to have the same problem, I'll try here, too. I have 2 external OEM assemblies A1 and A2 that both define class X (same name,...
2
by: Ron | last post by:
I need to write a custom textbox control that references an object located in the Global.asax class, but I can't compile the control into a DLL without including the reference to the project DLL...
7
by: JerryW | last post by:
I just reinstalled .NET 2003 (after repeated attempts to get ASP.NET Web Applications to work). I first did a complete uninstall of .NET 2003, .NET Framework 1.1, and IIS. I also completely deleted...
1
by: Ray | last post by:
Dear all, Now, I am using Global Assembly Cache to share assembly between server and clients. However, it seems that the server and clients use individual Global Assembly Cache. For example, the...
0
by: chris | last post by:
I'm trying to reference a global assembly in the global web.config file. Although I can reference a specific version assembly just fine, when I replace the assembly with a newer version, I have to...
11
by: Ron | last post by:
I have a web project compiled with the new "Web Deployment Projects" plugin for VS2005. I'm deploying the web project to one assembly and with updateable option set to ON. When I'm running the...
1
by: David Lozzi | last post by:
Hello, Writing a web app in asp.net using vb. Just created a new page, added a few minor controls and now blamo, the below error: HELP Server Error in '/newsite' Application....
2
by: arun1985 | last post by:
In the project i am using i am having the following code and when i upload it to the server.Its givig me the following error in the global.cs file. Server Error in '/' Application. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.