xaml parser error, System.ArgumentException on Generic.xaml , GenericArguments[0]

Locked xaml parser error, System.ArgumentException on Generic.xaml , GenericArguments[0]

  • Wednesday, March 28, 2012 11:06 AM
     
     

    Hello.

    I'm dealing with problem in Visual Studio 2010. When I edit something in Generic.xaml, getting this error message:

    System.ArgumentException was thrown on "..\Themes\Generic.xaml": GenericArguments[0], 'System.Object', on '*.RegistersBaseClass`1[T]' violates the constraint of type

    This problem causes the IntelliSense stops working which is very annoying. After build solution error message disapears for a few seconds and IntelliSense starts working again. But after that few seconds same error again.

    This problem occurred after I created new custom control called "RegisterBaseClass" but I didn't notice that there is  already exists class (a generic class and ofc not a Control) with same name. After i remove this error, problem mentioned above still persist. I can guarantee that Generic.xaml contains no mention of RegisterBaseClass.

    Any way how to "repair" that Generic.xaml file?

    Thank you in advance

All Replies

  • Thursday, March 29, 2012 9:23 AM
     
     Answered

    Hi,

    Restore generic.xaml from your backup copy.

    as far as my knowledge there is no way to repair Generic.xaml

    Regards

    Sneha