The name ‘InitializeComponent’ does not exist in the current contextOctober 14th, 2009 — Brian Foote
I get this error in my Silverlight projects occasionally and even though my projects still compile this error is annoying. I found a quick fix on the Silverlight forums which worked for me. Click on the xaml file causing the error and change the “Custom Tool” setting from MSBuild:MarkupCompilePass1 to MSBuild:CompileXaml and rebuild. The error should no longer appear. Remember to set the custom tool back to MSBuild:MarkupCompilePass1.