Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.net Visual Studio 2010在打开WPF用户控件时崩溃_.net_Wpf_Visual Studio 2010_.net 4.0 - Fatal编程技术网

.net Visual Studio 2010在打开WPF用户控件时崩溃

.net Visual Studio 2010在打开WPF用户控件时崩溃,.net,wpf,visual-studio-2010,.net-4.0,.net,Wpf,Visual Studio 2010,.net 4.0,我在一台计算机上打开WPF用户控件时遇到Visual Studio 2010崩溃问题。每当我在产品解决方案(解决方案中的任何项目)中打开任何WPF用户控件或尝试创建新的WPF用户控件时,Visual Studio都会崩溃 我已卸载或禁用了所有Visual Studio加载项(如ReSharper和.NET Reflector),并重新安装了Visual Studio 2010本身(以及Silverlight和.NET Framework 4.0),但这并没有起到任何作用 我可以创建一个新的WPF

我在一台计算机上打开WPF用户控件时遇到Visual Studio 2010崩溃问题。每当我在产品解决方案(解决方案中的任何项目)中打开任何WPF用户控件或尝试创建新的WPF用户控件时,Visual Studio都会崩溃

我已卸载或禁用了所有Visual Studio加载项(如ReSharper和.NET Reflector),并重新安装了Visual Studio 2010本身(以及Silverlight和.NET Framework 4.0),但这并没有起到任何作用

我可以创建一个新的WPF解决方案,并且WPF编辑器可以为新创建的窗口成功启动。但是,在其他类似配置的计算机上,我们可以成功打开产品解决方案中的用户控件,因此解决方案或用户控件本身似乎没有问题

崩溃错误报告中的信息如下所示:

事件类型:clr20r3 P1:devenv.exe P2:10.0.30319.1 P3:4ba1fab3 P4:microsoft.visualstudio.shell.10.0 P5:10.0.0.0 P6:4ba1e1f5
P7:506 P8:13 P9:system.argumentnullexception

如果在崩溃期间调试Visual Studio,则崩溃的调用堆栈如下所示:

Microsoft.VisualStudio.Shell.10.0.dll!Microsoft.VisualStudio.Shell.ServiceProvider.ServiceProvider(Microsoft.VisualStudio.OLE.Interop.IServiceProvider sp,bool defaultServices)+0x48字节 Microsoft.VisualStudio.Xaml.dll!MS.Internal.Package.Toolbox.AutoToolboxProjectManager.VSProject.get()+0x7c字节 Microsoft.VisualStudio.Xaml.dll!MS.Internal.Package.Toolbox.AutoToolboxProjectManager.AutoToolboxProjectManager(Microsoft.VisualStudio.Shell.Interop.IVsHierarchy层次结构,System.IServiceProvider提供程序,Microsoft.VisualStudio.Shell.Interop.IVsSmartOpenScope smartOpenScope)+0x109字节 Microsoft.VisualStudio.Xaml.dll!MS.Internal.Package.Toolbox.AutoToolboxManagerService.Update(Microsoft.VisualStudio.Shell.Interop.IVsHierarchy层次结构={System.\uu ComObject},bool force=false)+0x7a字节 Microsoft.VisualStudio.Xaml.dll!MS.Internal.Package.Toolbox.AutoToolboxManagerService.Start()+0x81字节 Microsoft.VisualStudio.Xaml.dll!MS.Internal.Package.DesignerPackage.Initialize.AnonymousMethod__0(对象参数)+0xd字节

WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate回调,对象args,int numArgs)行111+0xb字节C# WindowsBase.dll!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(对象源={System.Windows.Threading.Dispatcher},System.Delegate方法,对象args,int numArgs,System.Delegate catchHandler=null)行41+0xd字节C# WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeImpl()行360+0x52字节C# WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(对象状态)行337+0x7字节C# mscorlib.dll!System.Threading.ExecutionContext.runTryCode(对象用户数据)行484+0xe字节C# [本机到托管转换]
[管理到本机转换]
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext ExecutionContext,System.Threading.ContextCallback回调,对象状态)行461+0x12字节C# mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext ExecutionContext,System.Threading.ContextCallback回调,对象状态,bool ignoreSyncCtx)行447+0xd字节C# mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext ExecutionContext,System.Threading.ContextCallback回调,对象状态)行411+0xc字节# WindowsBase.dll!System.Windows.Threading.DispatcherOperation.Invoke()行303+0xFFFF73字节C# WindowsBase.dll!System.Windows.Threading.Dispatcher.ProcessQueue()行1567 C# WindowsBase.dll!System.Windows.Threading.Dispatcher.WndProcHook(System.IntPtr hwnd,int msg,System.IntPtr wParam,System.IntPtr lParam,ref bool handled)第1811c行# WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd=2032464,int msg=49716,System.IntPtr wParam=0,System.IntPtr lParam=0,ref bool handled=false)行344+0x15字节C# WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(对象o)行494+0x18字节C# WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate回调,对象args,int numArgs)行111+0xb字节C# WindowsBase.dll!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(对象源={System.Windows.Threading.Dispatcher},System.Delegate方法,对象args,int numArgs,System.Delegate catchHandler=null)行41+0xd字节C# WindowsBase.dll!System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority,System.TimeSpan超时,System.Delegate方法,对象args,int numArgs)第851行+0x3b字节C# WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd=2032464,int msg=49716,System.IntPtr wParam=0,System.IntPtr lParam=0)第398行C#


如果可能的话,我建议您在自定义控件中的每个事件处理程序周围放置一个try/catch块。

(我可以看出这已经有一段时间了)您是否尝试要求Microsoft检查您在Microsoft Connect上的崩溃?如果是,你能把这个问题和那个讨论联系起来吗?