Last week, I installed Visual Studio 2012, to play around with new features. We're probably not ready to move our production code to VS2012 yet, but I just wanted to see what's new. I should probably have installed it in a virtual machine, but hey, this is a well tested, production ready Microsoft product ... what could possibly go wrong?
Well, nothing went wrong. Until today.
I opened a Visual Studio 2010 solution which has never even been opened in VS2012 and it won't build.
The offending piece of code is when we have a website project (web application projects are unaffected), which contains a
table element with
runat="server", and the table contains a
tbody element. See the following code for an example.
A machine without VS2012 installed will build and run this without any complaints. A machine with VS2012 installed will produce the following error message while building:
Value of type 'System.Web.UI.HtmlControls.HtmlGenericControl' cannot be converted to 'System.Web.UI.HtmlControls.HtmlTableRow'.
This is a pretty major breaking change, and it's left me in a situation where I can't build one of our core products. I can't believe that this wasn't picked up given Microsoft's focus on quality and the range of automated testing which is carried out. Moreover, I just can't understand how installing VS2012 should break a VS2010 solution.
Further, I discovered that running
MSBuild from the Visual Studio 2010 Command Prompt succeeds on the solution file for the website, but then attempting to run the resulting compiled website with IISExpress yields a 500 Internal Server Error.
What's going on Microsoft?!