[英]C# Visual Studio Hanging for a Long Time When Starting Debugger
My Winforms app has a reference to a local DLL file called MyUtilities.dll. 我的Winforms应用程序引用了一个名为MyUtilities.dll的本地DLL文件。 Whenever I start debugging my app after making ANY code change and it reaches the point where it uses a method inside MyUtilities.dll to make a network call to a remote SOAP API, VS hangs for about 90 seconds and when I try to click anywhere inside VS, it brings up the popup that says it's "Loading symbols for MyUtilities.dll". 每当更改任何代码后开始调试我的应用程序时,只要达到使用MyUtilities.dll中的方法对远程SOAP API进行网络调用的程度,VS就会挂起大约90秒钟,并且当我尝试单击内部的任何位置时VS,它弹出显示“正在为MyUtilities.dll加载符号”的弹出窗口。
Here's where it gets interesting: 这是有趣的地方:
Now, AFTER it resumes running, I can see in the output that it didn't load the symbols): 现在,在它恢复运行之后,我在输出中看到它没有加载符号):
'MyApp.exe' (blah blah): Loaded 'C:\...\bin\Debug\MyUtilities.dll'. Loading disabled by Include/Exclude setting.
Any ideas on what could be causing the freeze? 关于什么可能导致冻结的任何想法? I'm running VS 2017 Community. 我正在运行VS 2017社区。
Figured it out. 弄清楚了。 After some more analysis in Process Monitor, I noticed entries for "MAILSLOT\\NET\\NETLOGON" like: 在Process Monitor中进行更多分析之后,我注意到“ MAILSLOT \\ NET \\ NETLOGON”的条目如下:
11:21:04 CreateFile \\MYPC*\MAILSLOT\NET\NETLOGIN SUCCESS
11:21:04 WriteFile \\MYPC*\MAILSLOT\NET\NETLOGIN BAD NETWORK PATH
11:21:17 CloseFile \\MYPC*\MAILSLOT\NET\NETLOGIN SUCCESS
Based on that, I found this StackOverflow question: Visual studio 2012 slow unit testing 基于此,我发现了这个StackOverflow问题: Visual Studio 2012缓慢的单元测试
...which led me to this article: https://social.technet.microsoft.com/Forums/windowsserver/en-US/20eb50e9-3e68-4d29-bcdd-a4fc166b9c00/adlds-very-slow-roundtrip-to-servermailslotnetnetlogon?forum=winserverDS ...导致我读到这篇文章: https : //social.technet.microsoft.com/Forums/windowsserver/zh-CN/20eb50e9-3e68-4d29-bcdd-a4fc166b9c00/adlds-very-slow-roundtrip-to- servermailslotnetnetlogon?forum = winserverDS
End Result: Go into each network adapter, go to its properties, go into the Internet Protocol Version 4 (TCP/IPv4) properties, go to Advanced -> WINS and disable NetBIOS over TCP/IP. 最终结果:进入每个网络适配器,进入其属性,进入Internet协议版本4(TCP / IPv4)属性,进入“高级”->“ WINS”并禁用TCP / IP上的NetBIOS。
After doing that, everything works perfectly (didn't even need to reboot). 完成之后,一切正常(甚至不需要重新启动)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.