Search code examples
asp.net-mvcviewdata

When upgrading to MVC beta to RC1 the application suddenly crashes where it shouldn't crash


When we upgraded MVC beta to MVC RC1 the development webserver that visual studio has suddenly crashed at some point in the application. After some searching I narrowed the bug to this simple line:

if (!helper.ViewData.ContainsKey("SomeString"))

SomeString is at that moment present in the viewData so the if statement should return false

when that line is executed the webserver crashes, no exeption in the program. We see a crash that seems to come from the method ContainsKey. Has someone experienced the same problem? should we roll back our insallation to MVC beta?


Solution

  • I have found the problem. The code that executes the ContainsKey method was in an external library. as we upgraded our development machines to RC1 we forgot to upgrade our build server to RC1.So the libraries we referenced were built with a reference to mvc beta. i still find it strange that those errors can occur but that was the problem.

    when we upgraded our build server the error was gone.