是什么导致Visual Studio在寻找defaultbinder.cs错误?

问题描述

当我遇到此错误时,只需重新安装Visual Studio 2019:https://github.com/dotnet/roslyn/issues/18814

我从未见过。重新安装后,我再也看不到它,但是我得到了其他东西。从调试器运行WPF应用程序时,“找不到源”正在寻找defaultbinder.cs。在调试器外部运行它可以正常工作。

我知道我以前曾见过此消息,但在网络上找不到任何信息。 -

enter image description here

$ exception {“对象引用未设置为 对象。”} System.NullReferenceException

在System.DefaultBinder.BindToMethod(BindingFlags bindingAttr,MethodBase [] match,Object []&args,ParameterModifier []修饰符,CultureInfo cultureInfo,String []名称,Object&state)中的

在f:\ dd \ ndp \ clr \ src \ BCL \ system \ defaultbinder.cs:第66行 在MS.Internal.Xaml.Runtime.DynamicmethodRuntime.CreateInstanceWithCtor(Type type,Object [] args) 在MS.Internal.Xaml.Runtime.ClrObjectRuntime.CreateInstance(XamlType xamlType,Object [] args)

enter image description here

解决方法

正如Kyle所说,应该只启用我的代码。这使我可以启动该应用程序。希望这对别人有帮助,或者如果没有其他人,对我有帮助,一年以后。