I've manually updated a ASP.NET 2.0 website to ASP.NET 4 and mixed MVC with the old web forms code.
I've hand-crafted the .designer files for websites and controls since they did not generate automatically. After doing so, the site works in IIS express.
When publishing to a webserver, all sorts of problems popped up; sites and controls all had a CodeFile tag (which is why the designer files were not auto generated), so I've changed all CodeFile tags to CodeBehind tags, and now IIS accepts it without a problem. Visual Studio also generates designer files now (yay), except that it chooses to label Div's and other HTML elements with runat="server" as HtmlGenericControl instead of HtmlElement that I generated manually. I know this has something to do with .NET 3.5 vs .NET 4.0/4.5 but for the life of me, I can't get it to work.
I could write something to replace those before building, but that's not a good solution in my book.
The error that IIS gives is:
The base class includes the field '<id of control>', but its type (System.Web.UI.HtmlControls.HtmlElement) is not compatible with the type of control (System.Web.UI.HtmlControls.HtmlGenericControl).
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34212
Any suggestions are welcome.