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