I've been pulling my hair out over this for the last few days.
I have a MVC WebApi project (api) and an ASP.NET Core site (presentation) in the same solution. Both target .Net Framework 4.6.1
They each independently work fine.
The presentation project depends (not in a binary/reference way) on the api project for its data.
When I build the presentation site, it puts incorrect versions of various binaries into the api bin folder. This means I can't actually easily debug both projects as the binding redirects in the web configs blow up.
Could not load file or assembly 'System.Net.Http.Formatting' or one of its dependencies
If I delete the api bin folder and build presentation, i get a smattering of binaries in the api bin folder (not the api main binary itself though).
Is there anything I can do to stop the presentation build putting binaries in the wrong place?
All nuget packages are consolidated and all pointing to 4.6.1
(yes I am already looking to migrate the api to ASP.NET Core as this should in theory solve the problem, but it's not immediately accessible for me to do this)
Any help would be much appreciated!