Silverlight Load View exception System.Xml.XmlException [xml_cannotfindfileinxappackage] parameter: servicereferences.clientconfig

Source: Internet
Author: User

There was an error in the Design view of Silverlight, but running the program is no problem.

Error message:

System.Xml.XmlException
[Xml_cannotfindfileinxappackage]
Parameter: Servicereferences.clientconfig
The debug resource string is not available. Keys and parameters often provide enough information to diagnose the problem. See Http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.50917.0&File=System.Xml.dll&Key=Xml_ Cannotfindfileinxappackage
In System.Xml.XmlXapResolver.GetEntity (Uri Absoluteuri, String role, Type Ofobjecttoreturn)
In System.Xml.XmlReaderSettings.CreateReader (String Inputuri, XmlParserContext inputcontext)
In System.Xml.XmlReader.Create (String Inputuri, xmlreadersettings settings, XmlParserContext inputcontext)
In System.ServiceModel.Configuration.ServiceModelSectionGroup.GetSectionGroup ()

Workaround:

1. Baidu

Baidu's solution is to say:

In Design view, the integrated development environment (IDE) will preprocess a portion of the XAML and code, display the interface, run it into the code in the constructor, you might write some business logic in the constructor so that it can't be preprocessed, so you can't see the interface in the development environment, the workaround is as follows:

Use Designerproperties.getisindesignmode (this) in the constructor to determine if you are designing in the IDE

    Public initialpage ()        {            InitializeComponent ();                        if (! Designerproperties.getisindesignmode (this))            {                //your Initial code             }        }

  In conjunction with my program, I use the GetIsInDesignMode () method to determine the Silverlight page constructor and the code that invokes the WCF service in the Load event. The result designer still has an error.

2.MSDN

Click on the help of the designer error screen to navigate to MSDN:

  Think of me. Some custom control constructors and load events do not use the GetIsInDesignMode () method to determine, so quickly processed, the designer returned to normal.

Silverlight Load View exception System.Xml.XmlException [xml_cannotfindfileinxappackage] parameter: servicereferences.clientconfig

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.