Visual Studio 2010 调试未启动,F5 或单击“播放”不工作,什么也不做。等待2-3分钟即可解决问题

发布于 2024-11-09 14:02:10 字数 324 浏览 0 评论 0原文

我有一个相对简单的 C# (Framework 4) 控制台应用程序。当我单击“播放”图标或按F5(即在调试模式下启动程序)时,图标会变为灰色一秒钟,然后又变回绿色,但没有任何反应。如果我等待 2 或 3 分钟并重试,调试会话将正常启动,命中断点等等。

我尝试过但没有成功的事情:

  • 清理解决方案,然后重建。
  • 重命名输出组件。
  • 重新启动 Visual Studio。

唯一有效的就是等待。我没有看到任何相关进程在这 2-3 分钟内仍在运行(svchost、conhost、*.vshost 或 cmd)。

I have a relatively simple C# (Framework 4) console application. When I click the "Play" icon or hit F5 (i.e. start the program in debug mode), the icon becomes gray for a second, then goes back to green, but nothing happens. If I wait 2 or 3 minutes and try again, the debug session starts up normally, breakpoints are hit and everything.

Things I have tried without success:

  • Cleaning the solution, then rebuilding.
  • Renaming the output assembly.
  • Restarting Visual Studio.

The only thing that works is just waiting. I don't see any related processes still running during these 2-3mins (svchost, conhost, *.vshost or cmd).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(13

童话 2024-11-16 14:02:10

试试这个:
打开任务管理器,转到进程选项卡并查找以您的应用程序命名的进程。如果它在那里,就杀死那个混蛋并再次尝试调试。对我来说这就像奇迹一样

try this:
open Task Manager, go to processes tab and look for process named after your app. if its there just kill the bastard and try to debug again. for me it worked like miracle

蘑菇王子 2024-11-16 14:02:10

当我的网络连接不稳定并且我已将调试器设置为自动从 Microsoft 的符号服务器下载符号时,我就遇到过此问题。它尝试了很长时间,然后超时,然后生活继续。输出窗口中应该有线索(通常列出所有正在加载的模块以及是否获得了它们的符号)。

I've seen this problem when my network connection is flakey and I've set the debugger to automatically download symbols from Microsoft's symbol server. It tries for a long time, then times out, then life proceeds. There should be clues in the Output window (where it normally lists all the modules being loaded and whether it got symbols for them).

老旧海报 2024-11-16 14:02:10

它发生在我身上。原因是因为我在两个不同的视觉工作室中打开了我的项目两次,其中一个正在等待我回答消息框中的问题。该消息是关于文件文件在源编辑器之外被修改的,并询问我是否要加载更改。希望它能帮助一些人,并对我的英语感到抱歉。

Its happened for me.The cause was because i had my project open in 2 times in 2 differents visual studio and one was waiting for me to answers a question in a message box. The message was about files file was modified outside source editor and was asking me if I wanted to load change. Hope it will help some people and sorry for my english.

嗫嚅 2024-11-16 14:02:10

就我而言,这是由于使用 vshost< /a>.我还不清楚为什么。这可能是由于运行平台(Win7 x64,我不是 - 也可能不是 - 管理员)与其他因素相结合

但如果我通过“项目属性&gt;调试”禁用vshost,我可以调试(使用F5)选项卡>“启用 Visual Studio 托管进程”。

I my case, it's due to the use of a vshost. I don't clearly understand yet why. It's possibly due to the running platform (a Win7 x64 where I am not - and may not be - administrator) combined with other factors

But I can debug (using F5) if I disable the use of vshost via the "Project Properties > Debug tab > "Enable the Visual Studio hosting process".

戴着白色围巾的女孩 2024-11-16 14:02:10

正如许多系统优化网站建议的那样,如果您在 Windows 中禁用“应用程序体验”服务,也可能会出现此问题。

可以使用 msconfig 或 services.msc 重新启用该服务,这完全解决了我的问题。

This issue can also occur if you disable "Application Experience" service in Windows, as many system optimization sites suggest.

The service can be re-enabled using msconfig or services.msc, this completely solved the issue for me.

不如归去 2024-11-16 14:02:10

我遇到了这样的问题。当涉及网络时,我在使用“运行”时遇到问题。

我将与程序/解决方案相关的所有文件移至本地硬盘驱动器 (C:);它们位于网络驱动器上。请务必检查“参考”(在“项目”下拉列表中查找属性;然后查找“参考”)。

我将确保所有引用都位于本地硬盘驱动器上,并在“引用”选项卡中正确设置“路径”(指向本地硬盘驱动器上的引用)。这似乎解决了这个问题。

I had a problem like this. I was having problems using "run" when the network was involved.

I moved all of the files related to the program/solution to my local hard-drive (C:); they were on a network drive. Be sure to check the "References" (Look under the "Project" pull-down for the properties; then look for "References").

I would make sure all references are on you local hard-drive and set the "Path" correctly (to the reference on you local hard-drive) in the References tab. This seemed to fix the issue.

十六岁半 2024-11-16 14:02:10

检查“编译”选项卡中的“项目属性”,选择“高级编译选项”。

如果您的目标是 .NET Framework 4 客户端配置文件,则无法
引用不在 .NET Framework 4 客户端中的程序集
简介。

有关.Net Framework 4 客户端配置文件的更多信息此处< /a>

Check the Project Properties in the Compile tab, select the Advanced Compile Options.

If you are targeting the .NET Framework 4 Client Profile, you cannot
reference an assembly that is not in the .NET Framework 4 Client
Profile.

More information about the .Net Framework 4 Client Profile here

醉态萌生 2024-11-16 14:02:10

显然,造成这种情况的根本原因有很多。就我而言 - 在 VS2010 中首次打开旧应用程序。解决方案已升级。一切编译都没有错误 - 但应用程序无法启动。有六个类库链接到该应用程序。事实证明,其中一个仍在编译为 .Net Framework 3.5,而所有其他都已自动升级到 .Net Framework 4。转换日志中可能有一条错误消息,当时我没有注意到其导入。当我将最后一个库更改为使用 4 而不是 3.5 后,一切都运行顺利。

Apparently there are many root causes for this. In my case - opened an old application for the first time in VS2010. The solution was upgraded. Everything compiles without error - but app won't start. There are half a dozen class libraries linked to the application. Turns out one of them was still compiling to .Net Framework 3.5, whereas all the others had automatically upgraded to .Net Framework 4. Likely there was an error message in the conversion log, whose import I didn't heed at the time. Once I changed that last library to use 4 instead of 3.5, everything ran smoothly.

谜泪 2024-11-16 14:02:10

某些键盘上的“功能锁定” (Fn Lock)。这完全出乎我的意料,因为我以为我不小心取消了按键绑定或类似的设置。不是这样的! - 所有功能键都不起作用,然后我注意到 Fn Lock 键发出微小的闪烁和恶意的光芒......

"Function Lock" ( Fn Lock) on some keyboards. This was completely unexpected, as I'd assumed I'd accidentally unset a key binding or something similar. Not so! - None of the function keys worked, then I noticed the tiny glimmering and baleful light of the Fn Lock key....

爱,才寂寞 2024-11-16 14:02:10

启用应用程序体验服务就可以了,我是 VB 新手,也遇到过这种情况。

Enabling the Application Experience Service will do, i'm new to VB and encountered that one.

心意如水 2024-11-16 14:02:10

看看如果您尝试“发布”而不是“调试”会发生什么。
如果发布有效,那么是因为一个进程(您可以在任务管理器中找到),其名称为 {Name of your Project}.vshost.exe

它的描述是“vshost32”,因此您可以按字母顺序对描述进行排序,以便轻松找到它。

See what happens if you try "Release" instead of "Debug".
If release works, then its because of a process (that you can find in Task Manager) which name is {Name of your Project}.vshost.exe

It's description is "vshost32" so you can sort by description alphabetically to find it easies.

软甜啾 2024-11-16 14:02:10

如果另一个应用程序附加到调试进程,也可能会发生这种情况。有一次,我将 ants 内存分析器附加到 Visual Studio(VS2012)调试过程中。后来我停止调试并尝试再次运行,但VS2012不允许我调试。只有在停止 ants profiler 会话后,我才能再次进行调试。

It can also happen if an another application is attached to the debug process. Once, I attached ants memory profiler to the visual studio(VS2012) debug process. Later, I stopped the debugging and try to run it again, but VS2012 didn't allow me to debug. Only after stopping the ants profiler session, I was able to debug again.

我早已燃尽 2024-11-16 14:02:10

我去了服务,发现名为“应用程序体验”的服务处于活动状态。

我右键单击更新了服务,然后再次右键单击,按“重新启动”。

这对我有用。我在 Windows 7 SP1 32 位上使用 Visual Studio 2015。

但过去我在 Windows 10 64 位的 Visual Studio 2015 上使用我的应用程序。

I went to the services, found the service called "Application Experience" it was active.

I updated the service on right-click, and then right-click again, press "Reboot".

This worked for me. I am using Visual Studio 2015 on Windows 7 SP1 32bits.

But in the past I was using my application on Visual Studio 2015 at Windows 10 64bits.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文