Repeatedly losing XAML intellisense in Visual Studio 2010
I'm using Visual Studio 2010 to edi开发者_StackOverflowt 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
Was having the same problem for a while now. Found that if I opened the xaml as source code and cleaned the solutions the complaints would go away.
精彩评论