473,732 Members | 2,204 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.1 7, Culture=Neutral ,
PublicKeyToken= aabbccddaabbccd d, 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 1220
"Tiraman" <ti*****@netvis ion.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.1 7, Culture=Neutral ,
PublicKeyToken= aabbccddaabbccd d, 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*******@free net.de> wrote in message
news:40******** *************** @news.freenet.d e...
"Tiraman" <ti*****@netvis ion.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.1 7, Culture=Neutral ,
PublicKeyToken= aabbccddaabbccd d, 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*****@netvis ion.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.1 7,
Culture=Neutral ,PublicKeyToken =aabbccddaabbcc dd, 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*******@free net.de> wrote in message
news:40******** *************** @news.freenet.d e...
"Tiraman" <ti*****@netvis ion.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
1307
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 situation. I have the following class structure: ASSEMBLY ATools
2
1496
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 processing that is performed on all orders. To accomplish this, I have created an interface and for the sake of this question, it's only method is called SpecialProcess. For each customer that requires special processing, I create a separate...
23
3281
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 to create certain textboxes, labels, and combo boxes? Any ideas would be appreciated. Thanks
8
10718
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 receive a byte array as one of its parameters. The project is marked for COM interop, and that all proceeds normally. When I reference the type library in the VB6 project, and write the code to call the function that returns the byte array, it works
10
3473
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 somewhere that each folder under the "web site" is compiled in separate assembly. I however, did not find that the "web site" creation in vs.net 2005 created any AssemblyInfo.cs file.
5
1612
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 out that the dll stay in the memory ? lets say that if no one access the dll for 60 sec it will be removed from the memory and only in the next time
2
1002
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
10958
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: // compiler options System.CodeDom.Compiler.CompilerParameters options = new System.CodeDom.Compiler.CompilerParameters(); options.GenerateExecutable = false; // result is a dll
10
9681
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 and copyright information (the word "CopyRight" with company name and year) is filled in automatically once a new project is created. However, I have no idea where I can configurate it in my new VB 2008. Thanks for your kindly advice!
0
8946
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8774
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9447
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9307
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9235
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9181
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
3261
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.