我正在使用Mvvm Light(最新版本)构建Silverlight 4应用程序,而VS 2010每5分钟崩溃一次甚至更少。因此,这是不可能的。
我相信这是因为我在做我的MVVM实施或出现问题。
我有时会在设计器上收到此错误。
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)
任何帮助将不胜感激,在此先感谢。
最佳答案
我有一个类似的问题,因为每次我在设计器中打开XAML文件时VS都会崩溃。原来,在对模型进行了一些更改之后,我的设计时数据正在通过属性验证器和异常传递。我最好的猜测是,在ViewModel中发生了非常错误的事情,该错误被VS实例化为设计师的支持。
关于silverlight - Visual Studio崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5436879/