windows phone 8 - NullReferenceException thrown when app is updated and new UI added - WP8 -


this strange , happening first time.

i have 1 version of app in store. next version has few ui changes. lot of re arrangements made.

now happens is, textblock written in xaml nullreferenceexception when try assign text. initilizecomponent called before assign value, how textblock remain null!

                <grid x:name="adsdialog" grid.row="2">                     <grid.rowdefinitions>                         <rowdefinition height="*"/>                         <rowdefinition height="auto"/>                         <rowdefinition height="30"/>                     </grid.rowdefinitions>                     <stackpanel horizontalalignment="center" verticalalignment="center">                         <textblock name="statuspreview1" text=" " width="240" textalignment="center" foreground="#ff121212" fontfamily="{staticresource ciclesemi}" maxwidth="250" maxheight="70" horizontalalignment="center" verticalalignment="center" textwrapping="wrap" margin="0,0,0,3" />                         <textblock name="statuspreview" text="" width="240" textalignment="center" foreground="#ff121212" fontfamily="{staticresource ciclesemi}" maxwidth="250" maxheight="70" horizontalalignment="center" verticalalignment="center" textwrapping="wrap" margin="0,0,0,3" />                     </stackpanel>                     </grid> 

the error gone when rebuild app. throw exception if push out update existing users!

statuspreview1 new textblock.

somebody please help!

while can't explain why got null exception in first place, concerns unfounded. after updating, users have exact same binary content you. data stored in application storage can cause issues during update.

most likely, compiler failed notice of changes , didn't regenerate files in obj folder (did change system date of computer chance?). when doing full rebuild, compiler stops trying figure out files need regenerated, , compiles scratch.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -