Some colleagues of mine are experiencing the following weird issue, with an MVC2 application that is contained within a solution of around a dozen class libraries.
Every so often, running the application using IISExpress (configured using VS2010 SP1 in the 'web' tab of the project properties) the....
'Could not load type [namespace.namespace].ViewPage<T>'
.....error will show, for the default view that is trying to render. The solution is fully built however and manually removing the BIN folder contents, rebuilding and re-running the application does not fix the issue. All the DLLs which are required are present in the bin directory of the MVC application and for most of the developers, there are no issues.
The only workaround we have found to date, is to remove the temporary asp.net files from the offending machine AND clear the working directory of all files and then perform a "Get specific version" from TFS. Once this has been done - rebuilding the project and running it makes it all work again.
Can anybody shed any light on why this is occasionally affecting us? It's infrequent and has only affected a few individuals so far, but it's really frustrating to work out and has used up several days already trying to find a reason why and put something in place to stop it.
Using VS2010 SP1 and TFS 2010 via Team Explorer, Windows XP dev machines (Unfortunately) with IIS Express. No other weird or wonderful environment or build oddities that I can think to mention