I have 2 solutions.
- Main
Which builds an assembly: Main.DomainTypes.dll
(this will get packaged as a nuget package)
- External
Which builds an assembly: External.EventTypes.dll
(this is also packaged as nuget package)
External.EventTypes.dll
references Main.DomainTypes.dll
via it's nuget package.
Now, some code has been added to Main, that references External.EventTypes (which therefore also references Main.DomainTypes).
When I run Main, it throws a FileNotFound exception, because it is trying to load the version of DomainTypes referenced by External.EventTypes, instead of the version it has just built.
I'm guessing that Main tries to load the highest version number referenced, which is the version in the nuget, not the version it has just built, except the version on disk IS the one just built, not the one referenced.
E.g., the nuget version of Main.DomainTypes referenced by External.EventTypes is 1.0.123, but the version of Main.DomainTypes just built doesn't yet have a package number, so defaults to 1.0.0
How can I get Main to load the local version, and not the nuget version?
I realise I could remove the circular reference by (re)defining the DomainTypes in external, but I'd rather not.