I'm using Visual Studio 2010 to edit XAML for Silverlight (4). On a daily, or even hourly basis I lose my XAML intellisense randomnly.
Often I'll get a whole page of valid XAML smothered in blue underlines from Visual Studio 2010's parser getting confused:
Here is one of the errors:
Error 6 The type initializer for 'Microsoft.Expression.Platform.Silverlight.Metadata.FrameworkElementMetadata' threw an exception. C:\projects...\Styles.xaml
I get this problem too, but it is intermittent at best. Visual studio is constantly re-compiling your XAML (and other code) behind the scenes and sometimes it will encounter an error, and that is where the problem is coming from. Sometimes it may be that there is no error, but VS decided to compile something while you were in the middle of typing a line. All I do is hit 'build' or 'rebuild' and everything works again.
we had similar problem, could solve it by opening the xaml as source code for this, right click on the xaml and click open with. select source code editor without encoding. you may also want to set this as default behavior
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With