I inherited a code base that wasn't well thought out, and am running into some circular reference problems. My team doesn't currently have the time or resources to do a huge refactor, so I was wondering if there was some switch that I could flip that says "build these two dlls atomically."
A simplified example:
DLL D0:
class A1 -> References B1
class B1 -> References A1
Class A1 and B1 have references to each other, and as they're in the same DLL, this is fine - but they don't have much in common so I want to break them out into separate dlls.
However, the following is impossible because of a circular reference problem:
DLL D1: class A1 -> References D2.B1
DLL D2: class B1 -> References D1.A1
I want to be able to tell MSBuild to build (D1+D2) as if all of the code were in a single dll. Is there anything I can do here or do I follow SOP and "hack it in?"
Disclaimer: I understand this implies I have a much bigger problem with my model (the most glaring is an improper use of interfaces), but in the small company, real world scenarios dictate that I bend over backwards to fix production bugs at the expense of best practices.
Click the "Formulas" tab in the ribbon menu at the top of the Excel window. Click the small arrow next to the "Error Checking" button in that area. Move your mouse over "Circular References" and the last entered circular reference will appear. Click on this reference to jump to that cell on the spreadsheet.
To start, click on the 'File' tab. On the 'Excel Options' window, go to the 'Formulas' section and tick the 'Enable iterative calculation' box. Click 'OK' to save the changes. After that, you will not get any warning whenever there's a circular reference.
Manually detect Circular References in ExcelGo to tab 'Formulas', choose 'Error-checking' and 'Circular References'. Excel will show you exactly in which cell(s) circular references are detected.
My team doesn't currently have the time or resources to do a huge refactor
so... DO NOT DO THIS:
but they don't have much in common so I want to break them out into separate dlls.
Leave it alone until you can apply significant refactoring to the whole solution.
This is a case where refactoring an organizational peeve will force a huge amount of refactoring down stream. And you have much bigger problems to deal with. I've been there. I feel for you. Good luck mate.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With