I'm building a Jenkins build server for a .Net application. It's based on ASP.Net MVC 5, and has tests through NUnit.
One of my testing projects Errors out for all the tests on the build server.
1) SetUp Error : project.Test.Area.Test_Name
SetUp : System.IO.FileLoadException : Could not load file or assembly 'System.Web.Mvc, Version=5.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at project.Test..Area.SetUp()
All my projects and test projects reference System.Web.Mvc 5.2.3.0, and the testing project doesn't even use the System.Web.Mvc namespace. The System.Web.Mvc namespace is set to copy local, and included in the NuGet package manager.
I'm assuming it might be another dependency, which itself depends on MVC 5.1.0.0, but since my project doesn't depend on that version Jenkins had no reason to fetch it while my local system already has it from other projects.
The various app.config and web.config files also all specify 5.2.3 for MVC.
Is there a way to figure out which dependency is causing the issue, or should I just find a way to install MVC 5.1.0.0 on the build server?
Edit: I found this reference to a transform in Mvc 5.1.2
src\packages\Microsoft.AspNet.Mvc.5.1.2\Content\Web.config.install.xdt:
28 <dependentAssembly xdt:Transform="Insert">
29 <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
30: <bindingRedirect oldVersion="1.0.0.0-5.1.0.0" newVersion="5.1.0.0" />
31 </dependentAssembly>
32 </assemblyBinding>
Does that look like that transform should be transforming old 5.1.0 versions to 5.1.2.0 and just isn't updating it right?
Edit 2: Nope, changing that doesn't affect anything, and I can't find anywhere else in the project that 5.1.0 is referenced.