I'm trying to create a blank Visual Web Part project with VS 2012 (on Windows 7) for a site on SP 2010 Foundation. When I build the project, it throws this error "The name 'InitializeControl' does not exist in the current context".
I've also tried using the "SharePoint 2010 Project" and "SharePoint 2010 Visual Web Part" VS 2012 Project templates targeting .NET Framework 3.5, .NET Framework 4.0 and .NET Framework 4.5 but I still get the same error.
The web part's corresponding .ascx.g.cs file is empty.
How can I overcome this error?
Could this issue have something to do with my dev environment (Windows 7 Enterprise, SP 2010 Foundation, Visual Studio 2012 installed along with VS 2010 SP1 with Power Tools)?
Am I the only one not able to build a sandboxed Visual Web Part solution targeting SP 2010 Foundation with VS 2012?