[Silverlight entry series] error: 2103 invalid or malformed application: Check manifest

Source: Internet
Author: User

When debugging Silverlight today, I encountered a strange error (error: 2103 invalid or malformed application: Check manifest ):

Error: unhandled error in Silverlight Application
Code: 2103
Category: initializeerror
Message: Invalid or malformed application: Check manifest

I searched for a solution to this error, most of which is *. the xap compressed package contains fewer items. Rename the xap into a zip file and open it to check whether the XAML file exists. This article is useful in comparison with this article. But I did what they did, and the problem still exists.

After a few hours, I finally got it done. In order to enable international multi-language support, I manually modified the project file. csproj, which contains the multi-language part:

 
1:<Supportedcultures>
 
2: En, fr-fr
 
3:<Supportedcultures>

And in fact I didn't add XXXX. En. resx resource file (XXXX. fr-FR.resx) is there.

The problem is caused by this reason.

Solution:

Add an XXXX. en-US.resx and add:

 
1: cultureinfo culture =NewCultureinfo ("En-US");
2: thread. currentthread. currentuiculture = culture;
3: thread. currentthread. currentculture = culture;

This solves the problem.

Conclusion: errors reported by Silverlight are often irrelevant. Please be careful. (In addition, Silverlight's multi-language internationalization is really worse than flex, rather poor-you have to manually modify the project file. csproj file, which is really Bt .)

Supplement tips-other possible reasons:

1. You modified the namespace, but the. app name in the project property is not modified. As a result, the project properties, app. XAML, app. XAML. CS, and silverlightcontrolhost are inconsistent. For details, refer to this post.

2. the constructor of the multi-language resource file is internal rather than public (this value may be automatically generated in the middle and modified by vs2010, and Bt is compared)

3. if you define resources in APP. XAML and contain duplicate keys, this error will also be reported: Initialize Error #2103.

4. Repeat copylocal-repeat the referenced DLL. Set copylocal = true in one place and copylocal = false in other places.

5. No. xap and. XAML mime are configured for IIS. For details, refer to this post.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.