473,396 Members | 1,734 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,396 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 1232
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.