Visual Studio 在启动时冻结或挂起
我使用 Visual Studio 一段时间了,发现当我打开 Visual Studio 并打开项目时,上次打开的所有文件都保持打开状态。
这会导致我的 Visual Studio 在启动时冻结或崩溃。
我在安装中使用了很多插件,想知道是否有办法防止这种情况发生。
I have been using Visual Studio for a while and found that when I open visual studio and open the project all the files that were open last time remain open.
This causes my Visual Studio to freeze or crash on startup.
I am using a lot of plugins in my installation and wonder if there is a way to prevent this from happening.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(15)
这对我有帮助:我删除了所有 SDK、JDK 和 JDK。之前已在 VS 设置中建立根的 JRE 文件夹。之后我使用了 devenv.exe /ResetUserData 和 devenv.exe /ResetSettings 。
在 Visual Studio 2015 上为我工作。
This helped me: I deleted all SDK, JDK & JRE folders that had been rooted in VS settings before. After that I used
devenv.exe /ResetUserData
anddevenv.exe /ResetSettings
.Worked for me on Visual Studio 2015.
您是否尝试过重置用户设置?它确实帮助了我:
Have you tried resetting user settings? It did help me:
运行:
Devenv /ResetSkipPkgs
http://msdn.microsoft.com/en-us/library/ms241276%28VS.80%29.aspx
或
您是可能正在寻找
/SafeMode
命令行开关:这将在禁用所有加载项的情况下启动 Visual Studio。
Run:
Devenv /ResetSkipPkgs
http://msdn.microsoft.com/en-us/library/ms241276%28VS.80%29.aspx
or
You are probably looking for the
/SafeMode
command line switch:This will start Visual Studio with all add-ins disabled.
您可以更改
Visual Studio 2010
启动设置。工具
-->选项
-->启动
-->启动时
-->显示空环境
-->保存
Visual Studio 有插件限制。仅使用最适合您的插件。有一个针对开发人员的最佳 Visual Studio 2010 插件列表。
Visual Studio 2010 - 推荐扩展
You can change your
Visual Studio 2010
start up settings.Tools
-->Options
-->Startup
-->At startup
-->Show empty environment
-->Save
Visual Studio has a plugins limit. Use only plugins that best for you. There is a list for best Visual Studio 2010 plugins for developers.
Visual Studio 2010 - recommended extensions
或者
对我来说效果很好
or
Worked fine for me
我在 Community 2015 版本中遇到了同样的问题。我按照 Vidas Vasiliauskas 的建议解决了这个问题,即删除用户设置。
问题是我之前有 enterprise 2015 版本,我使用我的 Microsoft 帐户登录。当尝试打开 community 版本时,它尝试执行以下操作所以用同一个帐户,我认为这是问题的原因。
因此,我建议那些有同样问题的人在命令行提示符下运行以下命令:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv .exe /重置用户数据
I had the same issue with Community 2015 version. I solved it with Vidas Vasiliauskas suggestion, which was to erase user settings.
The thing is that I previously had enterprise 2015 version, in which I was logged in with my Microsoft account. When trying to open community version, it tried to do so with that same account, which I believe was the cause of the issue.
Therefore, I would suggest to those with the same problem to run the following command at Command Line Prompt:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe /ResetUserData
就我而言,VS 2013 Professional 在启动时挂起,因为许可证不再有效。
日志文件中的最后一项:
在 msdn.microsoft.com 订阅页面上:“您的订阅不再有效,请联系您的管理员。”
我必须从我的雇主那里获得更新的订阅。
In my case, VS 2013 Professional was hanging on startup because the license was no longer valid.
Last item in the log file:
And on the msdn.microsoft.com subscription page: "Your subscription is no longer active, contact your administrator."
I had to get an updated subscription from my employer.
当它挂在启动屏幕上时:
可能是防病毒解决方案阻止了 Visual Studio。
卡巴斯基安全软件 16.0.1.445 使 Visual Studio 2015 挂在启动屏幕上。旧版本 16.0.0.614 工作正常。
When it hangs on the splash screen:
It could be that an anti-virus solution is blocking Visual Studio.
Kaspersky Internet Security 16.0.1.445 makes Visual Studio 2015 hang on the splash screen. The older version 16.0.0.614 works fine.
清除 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config 中的标记元素
对 C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config 也执行相同操作
标签应该是
Clear the tag's elements in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config
Also do the same with C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config
The tag should just be
<runtime/>
这是因为渲染 IDE UI 尝试这个希望它能解决
1- 打开“Visual Studio”
2- 从顶部菜单中选择“选项”
3- 导航到“环境 => 常规”
4- 取消选中“优化屏幕渲染”不同的像素密度”
5-重新启动 Visual Studio
This is becuase of rendering IDE UI try this hope it will resolve
1- Open "Visual Studio"
2- Select "Options" from the top menu
3- Navigate to "Environment => General"
4- Unchecked "Optimize rendering for screens with different pixel densities"
5- Restart visual studio
如果您的 Visual Studio 2019 由于扩展错误而卡住,可以通过以下方法使其恢复正常。
首先,以安全模式 (
devenv.exe /SafeMode
) 启动 Visual Studio 并卸载麻烦制造者。此后,如果 Visual Studio 2019 仍然没有响应,您需要执行以下操作:
参考:
希望它可以帮助您并确保 VS 修复/重新安装的安全。
快乐编码:-)
If your Visual Studio 2019 is stuck due to a faulty extensions, here is a way to get it back to normal.
First, start Visual Studio in safe mode (
devenv.exe /SafeMode
) and uninstall the troublemaker.Hereafter, if Visual Studio 2019 is still unresponsive, you need to do the following:
For reference:
Hope it helps you and safe a VS repair/reinstall.
Happy coding :-)
启动 VS 2015 后,我在 VS2015 中挂起(没有响应)约 5 分钟(挂起本身在 VS 2015 打开后约 2 分钟开始)。
事实证明,SQM(质量指标服务)在 C:\Users(me)\AppData\Local\Microsoft\VSCommon\14.0\SQM 中创建了数千个文件。
删除这些文件解决了问题。
通过 Windows 注册表将 dword 设置为零来关闭 SQM
计算机\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VSCommon\14.0
I had a hang (not responding) in VS2015 for a about 5 minutes after starting VS 2015 (the hang itself started about 2 minutes after VS 2015 opened).
It turned out that the SQM (Quality Metrics Service) and created thousands of files in C:\Users(me)\AppData\Local\Microsoft\VSCommon\14.0\SQM.
Deleting these file fixed the problem.
Turned off SQM via Windows registry by setting the dword to zero under
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VSCommon\14.0
我在使用 Git 源代码管理插件时遇到了这个问题。
我运行了
devenv.exe /SafeMode
然后在选项 -> 中源代码控制 ->插件选择确保选择“无”或“Visual Studio Team Foundation Server”。之后VS正常启动。
I was having this issue when using the Git source-control plugin.
I ran
devenv.exe /SafeMode
And then in Options -> Source Control -> Plug-in Selection made sure "None" or "Visual Studio Team Foundation Server" was selected. After that, VS started normally.
检查任务管理器。我运行了一个Setup.exe(不确定它正在安装什么),但是一旦我杀死它,VS 就会解冻。
Check Task Manager. I had a Setup.exe running (not sure what it was installing), but once I killed it, VS unfroze.
我最近 VS2017 陷入启动困境。所以我这样做并为我工作:
1 - 以管理员身份启动 cmd :运行以下命令:
cd "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE"
devenv.exe /SafeMode
2- VS 启动后,转到
工具=>扩展和更新:
然后卸载所有最近安装的插件(注意安装日期)和不需要的插件)
I have got recently VS2017 stucked on start up . so I did this and worked for me :
1 - start cmd as admin : run the following:
cd "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE"
devenv.exe /SafeMode
2- once VS is started , go to
Tools => Extentions and Updates :
then uninstall all plug-ins that installed recently ( notice the installed date ) and unnecessary ones)