Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Building one web project breaks the compiled version of the second in solution

I have a big solution with 30 projects of which 2 are web projects (MVC and WebAPI) with a bunch of background class library projects.

I have visual studio set up to host the web projects in IIS.

If I do a clean build, followed by a full build of the entire solution, then accessing both projects via a browser works fine. (they are in diff folders and hosted on diff 'domains' in iis)

If I make NO code changes, simply rebuild one of the 2 web projects, the OTHER one stops working.

To be clear, rebuilding the WebAPI project causes the MVC project to have errors. And vice versa.

The error I get is saying that System.Web.Http.Formatter is not found. The detail says that the located assembly version is different from the reference version. Checking the bin folder shows that that is not the case.

like image 463
user230910 Avatar asked Jan 22 '16 08:01

user230910


1 Answers

Make sure that all the solution's resources are up to date. If you use Nuget, update all packages in all projects (back up first!). It sounds like you have a version mismatch, where functionality is missing in DLLs copied to the output directory for the solution. It may involve changing some entries in the Web.config of each project, but without access to the code, it's hard to know for sure.

Report back once you've updated every library, and made sure the versions match across all projects in the solution.

like image 61
Apache Avatar answered Oct 11 '22 11:10

Apache