473,883 Members | 1,684 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Strong name assignment to a circular reference

How can I compile two projects with a circular reference while giving them a
strong name?

There is a project that we have that has two components that reference each
other e.g. A<->B thus creating A.dll and B.dll. I have a project (e.g. R
with an assembly name of Com.MyCompany.R .dll) that has to use this mess and
access A. So, R->A. Well, Com.MyCompany.R .dll is going in the GAC. It is
set for strong name (entry in the assembly pointing to my sn.exe -k
generated file). However, projects A and B are not strong named, thus R
won't compile until A and B are strong named.

So, I have given them a strong assembly name (e.g. Com.MyCompany.A .dll and
Com.MyCompany.B .dll). I have added the assembly reference to the key file,
and generated an sn.exe -k key for each, also. However, neither A nor B
will compile since each depend on the other to be already compiled with a
strong name. Other than commenting out all the references to each other (if
that would even work), what might I do to get R in the GAC?

Any help would be greatly appreciated.

Thanks,

-John
Jul 21 '05 #1
2 1950
Unwind the circular reference.

Your post inspired a blog entry... see the solution at the link below:
http://blogs.msdn.com/nickmalik/arch...18/398601.aspx

Hope this helps,

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"John E." <PleaseReply@us enet> wrote in message
news:eQ******** ******@TK2MSFTN GP09.phx.gbl...
How can I compile two projects with a circular reference while giving them
a
strong name?

There is a project that we have that has two components that reference
each
other e.g. A<->B thus creating A.dll and B.dll. I have a project (e.g. R
with an assembly name of Com.MyCompany.R .dll) that has to use this mess
and
access A. So, R->A. Well, Com.MyCompany.R .dll is going in the GAC. It
is
set for strong name (entry in the assembly pointing to my sn.exe -k
generated file). However, projects A and B are not strong named, thus R
won't compile until A and B are strong named.

So, I have given them a strong assembly name (e.g. Com.MyCompany.A .dll and
Com.MyCompany.B .dll). I have added the assembly reference to the key
file,
and generated an sn.exe -k key for each, also. However, neither A nor B
will compile since each depend on the other to be already compiled with a
strong name. Other than commenting out all the references to each other
(if
that would even work), what might I do to get R in the GAC?

Any help would be greatly appreciated.

Thanks,

-John

Jul 21 '05 #2
Thanks!

A funny note is that your blog was the exact issue... My mystical Project A
was our configuration library and and Project B was our logging library ;)

-John
"Nick Malik [Microsoft]" <ni*******@hotm ail.nospam.com> wrote in message
news:SO******** ************@co mcast.com...
Unwind the circular reference.

Your post inspired a blog entry... see the solution at the link below:
http://blogs.msdn.com/nickmalik/arch...18/398601.aspx

Hope this helps,

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"John E." <PleaseReply@us enet> wrote in message
news:eQ******** ******@TK2MSFTN GP09.phx.gbl...
How can I compile two projects with a circular reference while giving them a
strong name?

There is a project that we have that has two components that reference
each
other e.g. A<->B thus creating A.dll and B.dll. I have a project (e.g. R with an assembly name of Com.MyCompany.R .dll) that has to use this mess
and
access A. So, R->A. Well, Com.MyCompany.R .dll is going in the GAC. It
is
set for strong name (entry in the assembly pointing to my sn.exe -k
generated file). However, projects A and B are not strong named, thus R
won't compile until A and B are strong named.

So, I have given them a strong assembly name (e.g. Com.MyCompany.A .dll and Com.MyCompany.B .dll). I have added the assembly reference to the key
file,
and generated an sn.exe -k key for each, also. However, neither A nor B
will compile since each depend on the other to be already compiled with a strong name. Other than commenting out all the references to each other
(if
that would even work), what might I do to get R in the GAC?

Any help would be greatly appreciated.

Thanks,

-John


Jul 21 '05 #3

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

Similar topics

16
34574
by: Robert Mark Bram | last post by:
Hi All! Is there a way to reference a window by name without doing something like this: open (, 'windowName'); The open method will open a blank window if there is no window with such a name. I am trying to organise a navigation structure between two windows with content from the same host.. I have been trying the following:
2
410
by: Vera | last post by:
I have two assemblies that each consist of several classes. Each object instantiated from those classes can have one or more child- and/or parentobjects that are also instantiated from those classes. Most relationships exist within one assembly, but relationships between assemblies may sometimes occur. For each relationship, I have to make sure that an object from Class1 knows that it can have an object from Class2 as one of its children....
10
2701
by: Tony Jones | last post by:
Can anyone think of a reason why a 3rd party vendor writing .NET components would NOT strong name their assemblies? What harm does adding a strong-name to assembly present - I would think none whatsoever. Strong-naming the assembly should benefit the end user just in case he/she wants to reference the assembly in another strong-named assembly or add it to the GAC. If you were a third-party vendor, would you strong-name your...
2
1481
by: John E. | last post by:
How can I compile two projects with a circular reference while giving them a strong name? There is a project that we have that has two components that reference each other e.g. A<->B thus creating A.dll and B.dll. I have a project (e.g. R with an assembly name of Com.MyCompany.R.dll) that has to use this mess and access A. So, R->A. Well, Com.MyCompany.R.dll is going in the GAC. It is set for strong name (entry in the assembly...
6
1659
by: Manuel Lopez | last post by:
Hello, I have a Web Project (UserControls.dll) with some user controls that is shared by many asp.net web applicattions. What we do is copy UserControls.dll to all the applications bin folders an this works correctly. We want to have this shared code in the GAC.
6
5091
by: Stephen Robertson | last post by:
We are currently in a dead end with a circular reference issue using vb.net, and are hoping someone might help us resolve it. Idea... We have frmmain calling frmperson (dim f as new frmperson) in search (no record) mode. When the search is executed, frmperson calls frmsearchresult (dim f as new frmsearchresult) which is a listing of persons. From frmsearchresults, frmperson is called (dim f as new frmperson) with the resulting...
6
1201
by: Craig Buchanan | last post by:
i have two classes: User and Group. Each is in their own assembly. The User class has Groups collection and the Group has a Users collection. I would like to strongly-type these collections, but i can't seem to avoid the circular reference between projects. is there a way around this? Thanks, Craig Buchanan
0
1141
by: John Liu | last post by:
Recently I had to do some really nasty work (I consider any IL work nasty) to get a set of (not strong named) 3rd party assemblies to compile with our solution (which is strong named). DISCLAIMER: We've notified the 3rd party and a strong named version will be provided in the next release, but in the mean time for our internal development and testing to continue we've had to do some hacking. I do not recommend this technique with...
6
5691
by: raylopez99 | last post by:
Anybody use Strong Name Signing? I think this is used by default for Resource files, which is one reason perhaps I can't get my resource files to work (somehow the public key is messed up, perhaps since I've installed so many versions of Visual Studio) RL http://msdn.microsoft.com/en-us/library/h4fa028b.aspx Deployment in Visual Studio
0
9942
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
9792
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
11142
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
10743
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
10847
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
9574
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...
0
5797
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...
2
4220
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3233
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.