Reputation: 11
I am building a Silverlight 4 application using Mvvm Light(latest version), and VS 2010 crashes every 5 minutes even less. So it is impossible to work.
I believe it is because I am doing or there is something wrong with my MVVM implementation.
I get this error on the designer sometimes.
An unhandled exception has occurred:
An unhandled exception has occurred: [Xml_CannotFindFileInXapPackage] Arguments: ServiceReferences.ClientConfig Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.60129.0&File=System.Xml.dll&Key=Xml_CannotFindFileInXapPackage at System.Xml.XmlXapResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn) at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext) at System.Xml.XmlReader.Create(String inputUri, XmlReaderSettings settings, XmlParserContext inputContext) at System.ServiceModel.Configuration.ServiceModelSectionGroup.GetSectionGroup() I don't know if this is related with the crash. ..And I found this error in the event viewer: Application: devenv.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.ObjectDisposedException Stack: at System.Windows.Threading.Dispatcher.FastInvoke(System.Windows.Threading.DispatcherPriority, System.Delegate, System.Object[]) at System.Net.Browser.AsyncHelper.CheckUseLowLatencyNetworking() at System.Net.Browser.AsyncHelper.BeginOnUI(System.Threading.SendOrPostCallback, System.Object) at System.Net.Browser.BrowserHttpWebRequest.Abort() at System.ServiceModel.Channels.HttpOutput+WebRequestHttpOutput.Abort(System.ServiceModel.Channels.HttpAbortReason) at System.ServiceModel.Channels.HttpChannelFactory+HttpRequestChannel+HttpChannelAsyncRequest.AbortSend() at System.ServiceModel.Channels.HttpChannelFactory+HttpRequestChannel+HttpChannelAsyncRequest.OnSendTimeout(System.Object) at System.Threading._TimerCallback.TimerCallback_Context(System.Object) at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading._TimerCallback.PerformTimerCallback(System.Object)
Any help will be appreciated, thanks in advance.
Upvotes: 1
Views: 1032
Reputation: 3277
I had and fixed this problem. My symptoms were: I was having a Silverlight application that wasn't running correctly or was crashing frequently. While debugging, VS2010 frequently crashed with the exact same backtrace as above.
I was mis-initializing an object (trying to connect to an improperly formatted WCF service through a static Service object).
return (new ServicesClientVar.Service(new Binding(),
new EndpointAddress(new Uri("http://:8000/FileServices"))));
If you look at the Uri it is misconfigured.
SO, I'm not sure if this was an issue with WCF service clients specifically, or if any improperly initialized static object will cause this to happen.
Hope this helps someone else out someday...
Upvotes: 0
Reputation: 3885
Most of the times the reason why Visual Studio crashes in WPF and Silverlight applications is that it has difficulty in loading Xaml in design view. It is usually because of an error in XAML.
To prevent this issue from occuring:
Upvotes: 2