visual-studio Visual Studio 已停止工作 - 在 Win 7 上
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2856185/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Visual Studio has stopped working - on Win 7
提问by Amit
I have Win 7 Enterprise. If i open any .cs file on VS 2008/2010 it gives a message " Visual Studio has stopped working" on a dialog box. There are two buttons "Debug" and "close program". Debug button starts devenv in debug mode with assembly code as i do not have the pdb file for the same.
我有 Win 7 Enterprise。如果我在 VS 2008/2010 上打开任何 .cs 文件,它会在对话框中显示一条消息“Visual Studio 已停止工作”。有两个按钮“调试”和“关闭程序”。调试按钮在调试模式下使用汇编代码启动 devenv,因为我没有相同的 pdb 文件。
There is another machine with same configuration where the VS 2008/2010 Ultimate works fine. Even reinstalling Win 7 did not solve the problem. Any idea why it is happening?
还有另一台具有相同配置的机器,VS 2008/2010 Ultimate 运行良好。即使重新安装Win 7也没有解决问题。知道为什么会这样吗?
回答by Dirk Vollmar
Try with some standard VS troubleshooting steps:
尝试一些标准的 VS 故障排除步骤:
- Clean the solution
- Delete / rename all files in your solution created by VS, i.e. all .ncb, .suo, .user files
- Launch Visual Studio with all add-ins disabled:
devenv.exe /SafeMode - Reset All Settings: Tools -> Import / Export Settings -> Reset All Settings
- Delete HKCU:\Software\Micosoft\VisualStudio\9.0 and then restart Visual Studio
- Repair the Visual Studio installation through Add/Remove Programs
- 清洁溶液
- 删除/重命名解决方案中由 VS 创建的所有文件,即所有 .ncb、.suo、.user 文件
- 在禁用所有加载项的情况下启动 Visual Studio:
devenv.exe /SafeMode - 重置所有设置:工具 -> 导入/导出设置 -> 重置所有设置
- 删除 HKCU:\Software\Micosoft\VisualStudio\9.0 然后重启 Visual Studio
- 通过添加/删除程序修复 Visual Studio 安装
回答by user4325712
VS 2012 Stopped Working
VS 2012 停止工作
- I couldn't open a project or create a new one without it crashing
I was getting this error...
System.ComponentModel.Composition.ImportCardinalityMismatchException was unhandled Message=No exports were found that match the constraint: ContractName Microsoft.VisualStudio.Language.Intellisense.IGlyphService RequiredTypeIdentity Microsoft.VisualStudio.Language.Intellisense.IGlyphService InnerException:
- 我无法在不崩溃的情况下打开项目或创建新项目
我收到这个错误...
System.ComponentModel.Composition.ImportCardinalityMismatchException was unhandled Message=No exports were found that match the constraint: ContractName Microsoft.VisualStudio.Language.Intellisense.IGlyphService RequiredTypeIdentity Microsoft.VisualStudio.Language.Intellisense.IGlyphService InnerException:
However, as mentioned above this worked for me:
但是,如上所述,这对我有用:
Launch Visual Studio with all add-ins disabled:
devenv.exe /SafeModeReset All Settings:
Tools -> Import / Export Settings -> Reset All Settings
在禁用所有加载项的情况下启动 Visual Studio:
devenv.exe /SafeMode重置所有设置:
Tools -> Import / Export Settings -> Reset All Settings
回答by AbuTaareq
Recently I had the same problem, there is not much help on the Internet. So I thought this could be an easy fix. I re-install Visual Studio Several times but no luck. Finally, I uninstall .NET Framework along with Visual Studio, re-boot and re-install.
最近我也遇到了同样的问题,网上没有太多帮助。所以我认为这可能很容易解决。我重新安装了 Visual Studio 几次,但没有成功。最后,我将 .NET Framework 与 Visual Studio 一起卸载,重新启动并重新安装。
It worked fine !!
它工作得很好!
I thought it might help someone.
我认为这可能会帮助某人。
回答by WKK
For me ... one of extension I installed earlier is the culprit. That extension is some sort of code reflector. That tool manage to slow down my debugging when i step forward. And make visual studio 2012 constantly crashing. So my advice is be careful what tools and extensions you install... especially those that are not created by Microsoft themselves.
对我来说......我之前安装的扩展程序之一是罪魁祸首。该扩展是某种代码反射器。当我向前迈进时,该工具设法减慢了我的调试速度。并让visual studio 2012不断崩溃。所以我的建议是小心你安装的工具和扩展......尤其是那些不是由微软自己创建的。
回答by Tobby
Hey i had the same problem some time back but was solved when i installed this patch fix.
嘿,我前段时间遇到了同样的问题,但在我安装此补丁修复程序后解决了。
Check it out here -
http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=26662.
在这里查看 -
http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=26662。
回答by Alex Che
In my case the crash was caused by the parallel project builds. After went to Options -> Projects and Solutions -> Build and Runand set maximum number of parallel project buildsto 1, the crash was gone.
在我的情况下,崩溃是由并行项目构建引起的。在转到Options -> Projects and Solutions -> Build and Run并设置maximum number of parallel project builds为 1 后,崩溃消失了。
回答by SurajNarayan
- There could be multiple issues even in the code if the call to an async method an awaiter is missing.
- If everything seems to correct from code-wise then clean the solution and delete all the obj and bin fill from all project. Start building the solution again. This worked multiple times in my scenario.
- 如果缺少对 awaiter 的异步方法的调用,即使在代码中也可能存在多个问题。
- 如果从代码角度来看一切似乎都正确,则清理解决方案并从所有项目中删除所有 obj 和 bin 填充。再次开始构建解决方案。这在我的场景中多次起作用。

