473,500 Members | 1,712 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

[HELP] Assembly And Gac Question

Hi ,

Problem description :

I have 2 assemblies (A.dll And B.dll) .

They are both under the GAC and they are both using the functions of each
other .

Each time that I m doing a change in one of them I need to change the
version to both of them and than to recompile .
I also need to change the Version In The Assembly Directive of the aspx file
that use this assembly (i m not using code behind !)

<%@ Assembly Name="A, Version=1.0.6.17, Culture=Neutral,
PublicKeyToken=aabbccddaabbccdd, Custom=null"%>

what I m missing ?

how can I avoid those changes each time I m changing one or more dll's ?

Best Regards ,

Tiraman ;-)


Nov 20 '05 #1
4 1207
"Tiraman" <ti*****@netvision.net.il> schrieb
Hi ,

Problem description :

I have 2 assemblies (A.dll And B.dll) .

They are both under the GAC and they are both using the functions of
each other .

Each time that I m doing a change in one of them I need to change
the version to both of them and than to recompile .
I also need to change the Version In The Assembly Directive of the
aspx file that use this assembly (i m not using code behind !)

<%@ Assembly Name="A, Version=1.0.6.17, Culture=Neutral,
PublicKeyToken=aabbccddaabbccdd, Custom=null"%>

what I m missing ?

how can I avoid those changes each time I m changing one or more
dll's ?


Don't make circular references between DLLs. Try to move the common classes
to a common assembly that the others make use of. Build seperate layers of
DLLs that access each other only in one-way.

--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2
First 10x for your answer .

2nd let me describe a little scenario

I have one assemble that handle few function in front of my SQL
and I have one more that handle exceptions and I would like to write those
exceptions in the DB
so as you can see I must work with circular references between those 2 dll's
..

example , if there is an error in my Sql dll i call the exception dll which
make
some manipulation and call the sql again in order to write the error to the
DB

i did that in VB6 and there was no problem

so why can't i use or how can i use circular references ?

10x

"Armin Zingler" <az*******@freenet.de> wrote in message
news:40***********************@news.freenet.de...
"Tiraman" <ti*****@netvision.net.il> schrieb
Hi ,

Problem description :

I have 2 assemblies (A.dll And B.dll) .

They are both under the GAC and they are both using the functions of
each other .

Each time that I m doing a change in one of them I need to change
the version to both of them and than to recompile .
I also need to change the Version In The Assembly Directive of the
aspx file that use this assembly (i m not using code behind !)

<%@ Assembly Name="A, Version=1.0.6.17, Culture=Neutral,
PublicKeyToken=aabbccddaabbccdd, Custom=null"%>

what I m missing ?

how can I avoid those changes each time I m changing one or more
dll's ?
Don't make circular references between DLLs. Try to move the common

classes to a common assembly that the others make use of. Build seperate layers of
DLLs that access each other only in one-way.

--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #3
"Tiraman" <ti*****@netvision.net.il> schrieb
First 10x for your answer .

2nd let me describe a little scenario

I have one assemble that handle few function in front of my SQL
and I have one more that handle exceptions and I would like to write
those exceptions in the DB
so as you can see I must work with circular references between those
2 dll's .

example , if there is an error in my Sql dll i call the exception dll
which make
some manipulation and call the sql again in order to write the error
to the DB

I forgot another solution: Put them both in one library.
i did that in VB6 and there was no problem
Mabe you happened to have no problem but I struggled a long time til I
understood that layers of DLLs are a one-way. If once binary compatibility
is broken, you'll run into hell especially with cirular references. Believe
me! How could you set a reference to DLL1? You first must develop DLL1. But
you can't develop DLL1 because it needs DLL2 that is not developped because
it needs DLL1. You see? You're sawing off your own branch if you make
circular references. Whenever it was possible at all, then there is
definitely also another solution that works with 3 DLLs and without circular
references, or with only 1 DLL, or with 2 DLLs also only making a one-way
reference.
so why can't i use or how can i use circular references ?


I wrote the following article in the German group few days ago about the
same problem, so I'm trying to translate (the problem was how to access a
parent form from a usercontrol although the usercontrol and the parentform
were in an EXE and the control in a DLL but both should access each other):

"
I see it this way: A DLL can be accessed from different projects. In the
development process, the DLL is developed first. Because of this, the
developper can not know which projects and classes will be developped later.
Well, he could, if DLL designer and DLL user are the same person or if both
made an agreement, but "compiling technically" this doesn't change anything.
As a principile, a DLL is developped to fulfil some feature requirements.
They are defined and then put into action. Of course the DLL is developped
with the prospect of what it will be used for, but this happens in an
/abstract/ way, not /specifically/, i.e. not relating to certain classes
that do not even exist when the DLL is designed. The layers, consisting of
Exe and n DLLs that are accessing each other, are, concerning the knowledge
of the types a one-way: from top to the bottom.

[...]Another solution are interfaces, i.e. you define them in the DLL and
forces the user to implement them. This ensures the existence of the
members. A different approach is supplying a base class, derived from in
higher layers.
"
What's the best solution in your case, is very individual. Sometimes I'm
even changing my own design again and again til the right structure is
found, so it's hard to find the right one for you.
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #4
Hello Armin ,

i got your point about the circular reference and the question if i m having
this situation in the following case :

Exception.dll
**********
Public Function Log2DB() as Boolean
REM -- create a reference to the sql.dll in order to create
connection to the DB
Dim Connection As New Sql.Connection()

Now I Have some code that use few functions from the Connection
Class of the Sql.dll
And the functions in the Sql.dll use other functions but the
(Log2DB) in the exception.dll .

does it mean that i have circular reference ?

End Function

one more Question ,

i have lots of aspx files that use my dll's and each time that i m changing
the dll (which is under the GAC)
i need to change the assembly directive in my aspx files .
<%@ Assembly Name="A, Version=1.0.6.17,
Culture=Neutral,PublicKeyToken=aabbccddaabbccdd, Custom=null"%>

how can i make that my aspx files will work with my dlls (in the GAC)
without changing the version in the assembly directive each time ?

10x for your help .
"Armin Zingler" <az*******@freenet.de> wrote in message
news:40***********************@news.freenet.de...
"Tiraman" <ti*****@netvision.net.il> schrieb
First 10x for your answer .

2nd let me describe a little scenario

I have one assemble that handle few function in front of my SQL
and I have one more that handle exceptions and I would like to write
those exceptions in the DB
so as you can see I must work with circular references between those
2 dll's .

example , if there is an error in my Sql dll i call the exception dll
which make
some manipulation and call the sql again in order to write the error
to the DB

I forgot another solution: Put them both in one library.

> i did that in VB6 and there was no problem
Mabe you happened to have no problem but I struggled a long time til I
understood that layers of DLLs are a one-way. If once binary compatibility
is broken, you'll run into hell especially with cirular references.

Believe me! How could you set a reference to DLL1? You first must develop DLL1. But you can't develop DLL1 because it needs DLL2 that is not developped because it needs DLL1. You see? You're sawing off your own branch if you make
circular references. Whenever it was possible at all, then there is
definitely also another solution that works with 3 DLLs and without circular references, or with only 1 DLL, or with 2 DLLs also only making a one-way
reference.
so why can't i use or how can i use circular references ?
I wrote the following article in the German group few days ago about the
same problem, so I'm trying to translate (the problem was how to access a
parent form from a usercontrol although the usercontrol and the parentform
were in an EXE and the control in a DLL but both should access each

other):
"
I see it this way: A DLL can be accessed from different projects. In the
development process, the DLL is developed first. Because of this, the
developper can not know which projects and classes will be developped later. Well, he could, if DLL designer and DLL user are the same person or if both made an agreement, but "compiling technically" this doesn't change anything. As a principile, a DLL is developped to fulfil some feature requirements.
They are defined and then put into action. Of course the DLL is developped with the prospect of what it will be used for, but this happens in an
/abstract/ way, not /specifically/, i.e. not relating to certain classes
that do not even exist when the DLL is designed. The layers, consisting of
Exe and n DLLs that are accessing each other, are, concerning the knowledge of the types a one-way: from top to the bottom.

[...]Another solution are interfaces, i.e. you define them in the DLL and
forces the user to implement them. This ensures the existence of the
members. A different approach is supplying a base class, derived from in
higher layers.
"
What's the best solution in your case, is very individual. Sometimes I'm
even changing my own design again and again til the right structure is
found, so it's hard to find the right one for you.
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #5

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

Similar topics

0
1288
by: Vera | last post by:
Hi, I have a very annoying problem, with which I NEED HELP DESPERATELY!! It smells like a bug to me, but I'm not sure. SITUATION This description is a very much simplified version of the real...
2
1473
by: Chris Dunaway | last post by:
I'm writing an app that processes orders for various customers. For most customers, the processing is the same. However, a few customers require custom processing in addition to the standard...
23
3231
by: Jason | last post by:
Hi, I was wondering if any could point me to an example or give me ideas on how to dynamically create a form based on a database table? So, I would have a table designed to tell my application...
8
10679
by: intrepid_dw | last post by:
Hello, all. I've created a C# dll that contains, among other things, two functions dealing with byte arrays. The first is a function that returns a byte array, and the other is intended to...
10
3415
by: jojobar | last post by:
Hello, I am trying to use vs.net 2005 to migrate a project originally in vs.net 2003. I started with creation of a "web site", and then created folders for each component of the site. I read...
5
1600
by: Tiraman | last post by:
Hi , i have the A.dll in my GAC (only one occurrence) and after i deleted it from the GAC i saw that it still working . so i did IISRESET and now it throw an error . can we define the time...
2
982
by: Tommy Wang | last post by:
During an interview, I was asked with question 'how do you add information to a .NET assembly as metadata' I really have no idea until now, could someone please help? thanks in advance
2
10930
by: Luis Arvayo | last post by:
I am compiling and executing c# code at runtime and I need to define in CompilerParameters.ReferencedAssemblies one of my own assemblies together with the standard System.dll u others. Example:...
10
9632
by: =?Utf-8?B?SmFtZXMgV29uZw==?= | last post by:
Hi everybody, I'm trying to use the new VB 2008 right now and I want to know how to preset the company name and copyright informtion in Assembly Information. In my current VB 2005, company name...
0
7136
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
7018
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
7182
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,...
0
5490
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,...
1
4923
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4611
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3110
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3106
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
672
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.