473,624 Members | 2,249 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to create assemblies with cyclic dependency?

For example, System.dll contains assembly reference to System.XML.dll,
System.XML.dll refers to System.dll. Some another open projects contain
cyclic assembly dependencies too.

How C# compiler may do that?

Alex.
Nov 16 '05 #1
4 4544
That is probably because assemblies can be loaded only once. When load
System.XML it won't load Syste.dll if it is already loaded.

--

Stoitcho Goutsev (100) [C# MVP]
"Alex Sedow" <al*******@mail .ru> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
For example, System.dll contains assembly reference to System.XML.dll,
System.XML.dll refers to System.dll. Some another open projects contain
cyclic assembly dependencies too.

How C# compiler may do that?

Alex.

Nov 16 '05 #2
Alex,

You can not do this. It is not supported in C# or VB.NET (you might be
able to do it with managed extensions for C++, but I am not sure).

Not to mention the fact that it is a bit of a bad idea.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Alex Sedow" <al*******@mail .ru> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
For example, System.dll contains assembly reference to System.XML.dll,
System.XML.dll refers to System.dll. Some another open projects contain
cyclic assembly dependencies too.

How C# compiler may do that?

Alex.

Nov 16 '05 #3
Alex,
How C# compiler may do that?


You can look at the Rotor build process
(http://sharedsourcecli.sscli.net) to see how System.dll and
System.Xml.dll are handled.

Basicly you can do like this

- Build assembly A, but use conditional compilation symbols to exclude
any code that uses assembly B.
- Build assembly B and reference assembly A.
- Rebuild assembly A to the same version, and this time include all
code, including parts that depend on assembly B.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 16 '05 #4
Thanks to all for answers!
You can look at the Rotor build process
(http://sharedsourcecli.sscli.net) to see how System.dll and
System.Xml.dll are handled.

Basicly you can do like this

- Build assembly A, but use conditional compilation symbols to exclude
any code that uses assembly B.
- Build assembly B and reference assembly A.
- Rebuild assembly A to the same version, and this time include all
code, including parts that depend on assembly B.

Mattias


I shall look at it.

Alex.
Nov 16 '05 #5

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

Similar topics

3
3649
by: Mart Rogers | last post by:
We have a situation where we have decided (in an attempt to keep things simple) to stick to local assemblies rather than global ones. However we now have the following situation looming AssyA depends on AssyB depends on AssyD version 1 AssyA depends on AssyC depends on AssyD version 2 Obviously we cannot copy both versions of AssyD to the AssyA's bin directory. Is the only sensible way around this (rather than going the GAC route)...
7
2763
by: Brian Sabolik | last post by:
I'm not sure if I've broken any Object Oriented rules or not, but ... I have projects in 2 different solutions that need to use each other's methods. Therefore I may have an "update" method in project 1-solution A accessing a "save" method in project 2-solution B as well as "getinfo" method in project 2 accessing a "read" method in project A. Is this permitted? I am getting the "dependency file in project cannot be copied... conflict...
1
6929
by: Afaq | last post by:
Hi, After adding large number of empty resource files (which will be updated later), we are not able to compile the project. the following is the output of the build process. It fails while compiling the Max.UI.Win project with the following error Satellite assemblies could not be built because the main project output is missing.
3
2234
by: Dennis Lerche | last post by:
Hi I have a problem regarding cyclic dependency, yeahh I know bad design. But right at this moment I can't see how it should be redesigned to avoid this. The problem is that I just can't get it to compile ..... I have two classes each having their own header files, including each other. A forward decleration doesn't seem to be enough because they also call function calls within the classes. How do I solve this ???
3
2737
by: fc2004 | last post by:
Hi, Is there any tools that could report where cyclic header dependency happens? this would be useful when working with a large project where tens or hundreds of headers files may form complex inclusion relationships. Another question I have is how to solve this dependency when "typedef" is used. usually we can use forward declaration like "struc A; " to solve references like "struct A* p". But in many places we have
0
976
by: quortex | last post by:
Hi all, I have been playing around with NDepend (http://www.ndepend.com/) and on the dependency diagram I noticed some of my assemblies reference themselves. Now I obviously (and could not) perform selfreferencing using the visual studio 2005 GUI. I also always use project references to ensure cyclic dependencies are checked etc. So to check these apparent cyclic dependencies I used .NET Reflector (by Lutz Roeder) to inspect the...
4
1728
by: sakis.panou | last post by:
Hi all, Can anyone explain to me why the copy constructor of the COuterClass is getting called for this one? Let me start by saying I reckon this is seriously bad way of implementing anything of the sort, we have a way around this. I am simply trying to understand the order or creation and the reason for the call to the COuterClass copy constructor. Any help would be seriously appreciated. Thanks in advance. class COuterClass;
1
677
by: pallav | last post by:
I have to header files, circuit.h and latch.h that reference each other and are causing a cyclic dependency. latch.h file #include "circuit.h" typedef boost::shared_ptr<struct LatchLatchPtr; class Latch {
11
3211
by: sgurukrupagmailcom | last post by:
Hi, When searching for a solution to my problem I stumbled upon 'Curiously Recurring Template Pattern' see link. This is how the pattern looks: template < typename T > struct y { } ;
0
8233
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
8170
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
8474
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...
0
7158
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6108
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5561
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4078
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2604
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
1482
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.