none
Phone App Developed Under VS2012 Update 1 Reports Errors Under VS2012 Update 2

    Question

  • I developed a Windows Phone 8 app under VS2012 Update 1.  I installed Update 2, loaded the project and get the following error:

    Unable to cast object of type 'System.Reflection.CustomAttributeData to type System.ComponentModel.TypeConverterAttribute

    The error is reported on line 1 column 1 of the MainPage.XAML and App.XAML

    There was a similar question posted and not answered.  There was a reply that stated that rich text boxes within a scroll viewer would cause the problem, but I don't have any rich text boxes nor scroll viewers.

    Considering the fact that the error is very generic and did not occur prior to Update 2, how can I fix my app?

    Thanks,

    Glen Swanson

    Thursday, May 30, 2013 8:13 PM

All replies

  • does this happen with a new phone app?

    Thursday, May 30, 2013 10:57 PM
  • I don't know.  This is the one that I need to finish and since I don't know the actual cause, I could spend hours creating a new app and not find it.

    I spent hours creating learning all of the differences between desktop and RT apps and then more hours finding all of the differences between RT and phone apps.  Then I create a phone app that works, just needs a few tweaks, but in the mean time, I upgrade VS and now when I go back in to make the tweaks, I get this error out of nowhere.  Do you have ANY idea how frustrating this is?  I do not want to have to start from scratch and re-write this app because of an update!!!!!!!!

    Thursday, May 30, 2013 11:18 PM
  • After starting the process to rebuild my app from scratch, the error occurs when trying to set an ImageSource as a Resource.

    If you directly set an image source, everything is ok.

                <Image x:Name="FlexDesktopGraphic" HorizontalAlignment="Center" Height="240" Margin="0,130,0,0" 
                       VerticalAlignment="Top" Width="320" Canvas.ZIndex="1" Source="/FlexTestScreen.png"/>

    If you attempt to convert the Source to a reference

        <phone:PhoneApplicationPage.Resources>
            <ImageSource x:Key="TestScreenImage">/FlexTestScreen.png</ImageSource>
        </phone:PhoneApplicationPage.Resources>
               <Image x:Name="FlexDesktopGraphic" HorizontalAlignment="Center" Height="240" Margin="0,130,0,0" 
                       VerticalAlignment="Top" Width="320" Canvas.ZIndex="1" Source="{StaticResource TestScreenImage}"/>

    As soon as you build, the error "Unable to cast object of type 'System.Reflection.CustomAttributeData' to type 'System.ComponentModel.TypeConverterAttribute". 

    Even with this error, XAML interprets things properly.

    Again, this worked properly before Update 2.

    Please Help.

    Thursday, June 06, 2013 4:16 PM