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

查看:34
本文介绍了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:UsersAppDataRoamingMicrosoftVisualStudioActivityLog.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>AppDataRoamingMicrosoftVisualStudio<version>ActivityLog.xml" but you can also specify where you want the file to be:

Devenv /log PathNameOfLogFile

请参阅 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:

.vsSolutionNamev14.suo

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

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

我已经使用这个 PowerShell 脚本几天来在 git 分支之间切换后摆脱 .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 的路径是:

.vsSolutionNamev15.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 的路径是:

.vsSolutionNamev16.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天全站免登陆