Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

InitializeError, Failed to load pre-requisites for the... RSS

12 replies

Last post Sep 07, 2009 09:57 AM by BKrishna

(0)
  • pamtaro

    pamtaro

    Member

    3 Points

    4 Posts

    InitializeError, Failed to load pre-requisites for the application with East Asian languages in RC0

    Oct 02, 2008 11:08 PM | LINK

     My silverlight application is getting localized to 8 different language, 3 of which are Korean, Japanese, and Simplified Chinese.  When I run the application on a machine that has these languages installed, it works fine. But when I try to run it on a machine that doesn't have East Asian languages installed in Windows, I get error code 2105 - InitializeError, Failed to load pre-requisites for the application.  If I take out these 3 languages, the browser with the SL app loads fine.  Is this a bug?  Why would I expect another user's computer to have these East Asian languages installed?  If its not installed on the OS shouldn't Silverlight just use my default language?  I'd like to be able to just have one xap thats portable instead of two in expectation that some computers won't have East Asian language packs installed.

    Regional language options problem Silverlight Error Bug Dynamic Languages Silverlight 2.0 Silverlight2 Silverligh 2 RC0 Silverlight 2 RC0 Bug SL2RC0

  • StefanWick

    StefanWick

    Contributor

    3004 Points

    453 Posts

    Microsoft

    Re: InitializeError, Failed to load pre-requisites for the application with East Asian languages...

    Oct 16, 2008 05:07 AM | LINK

    Do you have the localized strings in satellite resource assemblies? If so, do you have them listed in the AppManifest.xaml?

    When the app loads, all assemblies listed in the AppManifest.xaml will be loaded. The loading of the localized assembly will fail if the corresponding culture is not supported by the current configuration. The workaround would be to remove the assemblies from the AppManifest.xaml and load them on demand based on the user's actual configuration.

    Let me know if this works for you.

    Thanks, Stefan Wick

    Microsoft Silverlight | http://blogs.msdn.com/swick/
  • pamtaro

    pamtaro

    Member

    3 Points

    4 Posts

    Re: InitializeError, Failed to load pre-requisites for the application with East Asian languages...

    Oct 16, 2008 04:23 PM | LINK

    Nope, my AppManigfest.xml doesn't list my resource assembly. In order to load the localized strings of different cultures, I've had to unload my silverlight project, edit the .csproj file, and add the culture i have between the <SupportedCultures>..</SupportedCultures> tag.  The app wouldn't load the localized resources if I didn't specify it in those tags.  Western languages worked fine, but adding any East Asian languages in SL causes it to crash because the East Asian language support is optional in Windows, there's a checkbox that needs to be checked off in Control Panel > Regional and Language Options for the East Asian language files to be installed. 

  • jordanhammond

    jordanhammond

    Member

    190 Points

    104 Posts

    Re: InitializeError, Failed to load pre-requisites for the application with East Asian languages...

    Oct 20, 2008 09:54 AM | LINK

    Hi, just comfirmed that I have the same problem.  Seems to be a big in Silverlight.  I have an app that supports many cultures, however if the client machine does not have the language pack installed, and the culture is defined in the SupportedCultures tag, then the app fails to load.

    This is a pretty serious flaw.

  • StefanWick

    StefanWick

    Contributor

    3004 Points

    453 Posts

    Microsoft

    Re: InitializeError, Failed to load pre-requisites for the application with East Asian languages...

    Oct 21, 2008 03:53 AM | LINK

    If you are creating a single XAP for multiple cultures, you can create satelite assemblies for each culture that contain the localized string resources. Be sure to NOT list them in the AppManifest.xaml file, but instead on-demand load them as appropriate. This will ensure that only the assemblies that are requrested per the user's configuration are being loaded, and thus you won't hit an exception for cultures that aren't installed on the client's machine.

    Thanks, Stefan Wick

    Microsoft Silverlight | http://blogs.msdn.com/swick/
  • jordanhammond

    jordanhammond

    Member

    190 Points

    104 Posts

    Re: InitializeError, Failed to load pre-requisites for the application with East Asian languages...

    Oct 21, 2008 06:11 AM | LINK

    StefanWick

    If you are creating a single XAP for multiple cultures, you can create satelite assemblies for each culture that contain the localized string resources. Be sure to NOT list them in the AppManifest.xaml file, but instead on-demand load them as appropriate. This will ensure that only the assemblies that are requrested per the user's configuration are being loaded, and thus you won't hit an exception for cultures that aren't installed on the client's machine.

    Thanks, Stefan Wick

     

    Hi Stefan, thanks for the info, this is exactly the only other option that I thought there was.   Pretty annoying hack though.  What I was after was more along the lines of an official statement from MS on MSDN that this is a bug, and that a patch is being worked on.  That and an online code demo to show users who have to code for internationalization how to go about such a work-around.

  • skygragon

    skygragon

    Member

    16 Points

    19 Posts

    Re: InitializeError, Failed to load pre-requisites for the application with East Asian languages...

    Nov 24, 2008 01:11 AM | LINK

    StefanWick

    Do you have the localized strings in satellite resource assemblies? If so, do you have them listed in the AppManifest.xaml?

    When the app loads, all assemblies listed in the AppManifest.xaml will be loaded. The loading of the localized assembly will fail if the corresponding culture is not supported by the current configuration. The workaround would be to remove the assemblies from the AppManifest.xaml and load them on demand based on the user's actual configuration.

    Let me know if this works for you.

    Thanks, Stefan Wick

    is there any changes about localization in 2.0RTW?

    because i encounterred error2105 with the same issue on a PC without chinese language supportted, however the codes worked fine in 2.0beta2 on the same pc.

  • cokkiy

    cokkiy

    Member

    2 Points

    1 Post

    Re: Re: InitializeError, Failed to load pre-requisites for the application with East Asian langua...

    Dec 07, 2008 05:05 AM | LINK

    I also encounter this error on SL 2.0, I thinks it's bug, MS should remove this.

    The God created the world.
    The programer made the world easy.
  • slyi

    slyi

    Participant

    1027 Points

    313 Posts

    Re: Re: InitializeError, Failed to load pre-requisites for the application with East Asian langua...

    Dec 09, 2008 02:48 PM | LINK

    I can verify this bug aswell, did you try language fallback like on the sample to get around this issue on http://wpf-e.spaces.live.com/blog/cns!2B248D261D0E0035!407.entry

  • manor

    manor

    Member

    44 Points

    56 Posts

    Re: Re: InitializeError, Failed to load pre-requisites for the application with East Asian langua...

    Jan 27, 2009 02:25 PM | LINK

    Do you have sample code on for this workaround? Thanks!