2

How can this happen? And How can I fix it?

enter image description here

2
  • 2
    Do you get any build warnings about a type being defined in more than one assembly...? Commented Aug 28, 2012 at 3:14
  • 1
    This is probably an MVC version issue due to a missing <bindingRedirect>. Commented Aug 28, 2012 at 3:15

1 Answer 1

5

My guess (and I stress it is just a guess) is that the test assembly and the assembly under test either reference different versions of the System.Web.Mvc assembly, or one is ultimately resolving a different version. Either way, ultimately the test assembly is expecting one version, and the assembly under test is returning another.

Try doing a clean then a full rebuild, and check other culprits like the web.config binding redirects as @SLaks points out in the comments.

Sign up to request clarification or add additional context in comments.

1 Comment

oh yeah, that was it. I had a reference to System.Web.Mvc of version 4.0.0 in the test project and 3.0.0 in the WebUI project. I just made them both be 3.0.0 and that solved it.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.