打开解决方案/文件时,Visual Studio Professional 2013崩溃 [英] Visual Studio Professional 2013 Crashes When Opening Solutions/Files

查看:161
本文介绍了打开解决方案/文件时,Visual Studio Professional 2013崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试打开我为前雇主工作时制作的某些网页/数据库解决方案,以让他们重新了解它们的内容,但是由于某些原因,Visual Studio Professional 2013决定在打开时要么崩溃,要么它们,或者当我尝试打开在其中创建的C#文件之一时崩溃.我不知道为什么现在要这样做,因为我制作这些文件已经有一个多月了,没有任何问题.同样,2013年本身似乎也没有任何问题.有建议吗?

I've been trying to open some of the webpage/database solutions I made while working for my previous employer, to get a refresher on what they were, but for some reason Visual Studio Professional 2013 just decides to either crash while opening them, or crash when I try opening one of the C# files I made in them. I have no idea why it's doing this now, since it's been a little over a month since I made these files without any problems. There doesn't seem to be anything wrong with 2013 itself, either. Suggestions?

推荐答案

对于VS2013: 我时不时遇到类似的问题,而我的解决方法是删除* .suo文件,然后打开解决方案.

For VS2013: I've hit a similar problem every now and then and my fix is to delete the *.suo file and then open the solution.

唯一无法使用的时间是扩展正在播放时,在这种情况下,我使用/safemode开关以安全模式打开了VS.

The only time that has not worked was when an extension was playing up, in which case I opened VS in Safemode using the /safemode switch.

devenv.exe /safemode

使用/log开关(如另一个答案所述)也是一个好主意,如果它确实是行为不当的扩展名,因为它可以帮助您对其进行跟踪.我计算机上的ActivityLog.xml文件的默认位置是"c:\ Users \<用户名> \ AppData \ Roaming \ Microsoft \ VisualStudio \< version> \ ActivityLog.xml",但您也可以指定想要的位置文件为:

Using the /log switch as noted in another answer is also a good idea if it turns out to be a misbehaving extension because that can help you track it down. The default location of the ActivityLog.xml file on my computer is "c:\Users\<username>\AppData\Roaming\Microsoft\VisualStudio\<version>\ActivityLog.xml" but you can also specify where you want the file to be:

Devenv /log Path\NameOfLogFile

请参阅以下网址的VS2013文档(带有指向其他版本的链接):/日志(devenv.exe)

See the documentation for VS2013 (with links to other versions) at: /Log (devenv.exe)

我希望能帮上忙.

对于VS2015 :相同的解决方案,只是suo文件位于不同的位置. VS2015添加了一个".vs"文件夹.在该文件夹中还有其他文件夹,其中一个名为与您的解决方案相同的名称,在该文件夹中还有另一个名为"v14"的文件夹,在该文件夹中(最后)是一个名为".suo"的文件.删除该文件.

For VS2015: Same solution, just the suo file is in a different place. VS2015 adds a ".vs" folder. Within that folder are other folders, one of which is named the same as your solution, within that folder is another folder named "v14" and within that one (finally) is a file called ".suo". Delete that file.

示例:您的解决方案称为无论如何".从您的任何"文件夹开始,suo的路径为:

Example: your solution is called "Whatever". Starting from your "Whatever" folder the path to the suo is:

.vs\SolutionName\v14\.suo

如果看不到".suo"文件,请记住它是一个隐藏文件.

If you can't see the ".suo" file, remember that it is a hidden file.

在git分支之间切换后,我已经使用了几天的PowerShell脚本来摆脱.suo文件:

I've been using this PowerShell script for a few days to get rid of the .suo files after switching between git branches:

get-childitem -Include .suo -Recurse -force | Remove-Item -Force –Recurse

到目前为止,我还没有遇到任何问题,但是不能保证它不会焚化您的笔记本电脑:),所以请谨慎使用它.

I've not had any problems with it so far, but no promises that it won't incinerate your laptop :) so use it carefully.

对于VS2017: .suo的路径是:

For VS2017: The path to the .suo is:

.vs\SolutionName\v15\.suo

我的猜测是,"v15"在以后的版本中会不断增加.

My guess is the "v15" will keep incrementing in future releases.

我找到了另一个SO答案,它涵盖了VS问题的其他一些解决方案,例如,如果您使用该工具,则刷新ReSharper缓存:即使创建项目,Visual Studio也会显示错误.

I found another SO answer that covers some other solutions to VS issues, such as flushing the ReSharper cache if you are using that tool: Visual Studio displaying errors even if projects build.

...和VS2019 .suo的路径是:

... And VS2019 The path to the .suo is:

.vs\SolutionName\v16\.suo

当我开始使用VS2019时,成功构建现有项目后,我收到很多错误"的报告.该编辑器不喜欢该解决方案中其他项目的名称空间.关闭VS,删除.vs文件夹,然后重新启动VS修复它.

When I started using VS2019 I got a lot of "errors" reported after a successful build of an existing project. The editor didn't like namespaces from other projects within the solution. Closing VS, deleting the .vs folder and restarting VS fixed it.

这篇关于打开解决方案/文件时,Visual Studio Professional 2013崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆