no ‘InitializeComponent’ does not exist in the current context

Today I created a simple Silver Light 4 application and copied a XAML and couple of classes from my existing project. Changed all the references of the old name spaces to new name space and compile it and I got this error. It took me 10 minutes to figure out what was the problem. Simple, I missed one namespace which was still pointing to the old namespace. So if you run into this error message, most probabily you missed one or more name space references to old name space. It seems some other people run into the same problem, if you do not have ‘CompileXAML’ option not set in the MSBuild.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s