Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is this the correct way to eliminate warning C4945 (symbol already imported from another assembly)?

I've got a .net solution (written in C++/CLI) which references some .dll projects as follows:

MainProject->ProjectA->ProbjectB
MainProject->ProjectB

Originally I'd referenced both ProjectA and ProjectB from MainProject which gave me the warnings as mentioned above.

I can remove the warnings by removing the reference to ProjectB from ProjectMain but it makes it less obvious that MainProject relies on ProjectB. Is this the right thing to do to get rid of the warnings?

like image 483
Jon Cage Avatar asked Dec 15 '25 09:12

Jon Cage


2 Answers

Speaking in general terms, a system of dependencies can be depicted by a directed graph where each node is a software component and each edge is a dependency. In my opinion, the more simplification that can be done to the graph, the better.

like image 60
Reinderien Avatar answered Dec 17 '25 09:12

Reinderien


Yeah that's fine.

If you have ReSharper, you can view the dependency graph by right-clicking ProjectMain --> Project Hierarchy.

like image 30
BlueRaja - Danny Pflughoeft Avatar answered Dec 17 '25 08:12

BlueRaja - Danny Pflughoeft



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!