Nap
Nap

Reputation: 8276

How was circular reference in DLL possible?

I was assigned to an existing project which has a lot of DLL. I was trying to rebuild all the DLL. Two of the DLL references each other. I tried to build the first DLL and i noticed it refers to a second DLL. But when I was going to build the second DLL it was requiring a reference to the first DLL. The good thing is there were backups for the two DLLs so I was able to refer them to each other and build the solution.

I want to know how were the two DLLs created in the first place if they were referencing each other. This reminds me of the chicken and egg problem. Is there a facility with .NET to do this? Note that each of the two DLL were VB.NET in their separate solutions.

Note: The two DLL were later used in other DLLs and a main Executable project.

Upvotes: 1

Views: 793

Answers (1)

Adriano Repetti
Adriano Repetti

Reputation: 67090

If you really want to have pain you may do this: - create dll #1 - create dll #2 - in dll #2 add a reference to #1 - build everything - in dll #1 add a reference to #2 (not using a "project reference" but via Browse). We had the same problem too, I think it's easy to do that kind of mistake when you use more than one solution and/or you do not add your references "by project".

Upvotes: 3

Related Questions