为什么 Visual Studio 不断崩溃?

发布于 2024-07-06 03:57:39 字数 256 浏览 9 评论 0原文

添加/删除引用和项目时,Visual Studio 会随机崩溃。 有什么想法吗? 安装 Sp1 有帮助吗?

编辑:除了 SourceSafe 之外,我不使用任何插件。 我的大部分开发都是在连接模式下进行的。

使用以下方式进行开发:
Visual Studio 2008
WinXp 终端服务 -> Win2k3 Sp2 (64位)
VSS 8.0,32位

Visual Studio randomly crashes when adding/removing references and projects.
Any thoughts why? Will installing Sp1 help?

EDIT: I do not work with any addons except SourceSafe. I do most of my development in connected mode.

Developing using:
Visual Studio 2008
WinXp Terminal Service -> Win2k3 Sp2 (64bit)
VSS 8.0, 32bit

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

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

发布评论

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

评论(11

腹黑女流氓 2024-07-13 03:57:39

我的 Visual Studio 2005 最近开始崩溃并锁定。 我最终修复它的方法是从命令行运行它:

devenv /resetuserdata

这清除了我所有的自定义,但它确实解决了问题。 如果您对 VS 进行了很多自定义,您可以尝试先导出您的设置,然后查看是否可以安全地导入它们。 或者,拍摄 IDE 的快照,以便您可以记住哪些按钮等位于何处。

My Visual Studio 2005 started crashing and locking up recently. The way I finally fixed it was to run this from the command line:

devenv /resetuserdata

That cleared out all my customisations, but it did fix the problem. If you've customised VS a lot, you could try exporting your settings first and then see if you can safely import them afterwards. Alternatively, take snapshots of your IDE so you can remember which buttons etc. you had where.

深海夜未眠 2024-07-13 03:57:39

尝试删除 .user 和 .suo 文件 - 这些是 VS 创建的用户选项文件。 您将获得每个项目的 .user 文件和解决方案的 .suo 文件。 当它们腐败时,就会发生奇怪的事情。 删除它们会让你失去一些小东西,比如当你开始调试时选择哪个项目作为启动项目,但它通常会清除这样的奇怪行为。

您可能还想清除所有临时文件位置,例如临时 ASP.NET 文件文件夹(如果您在 ASP.NET 中工作),以防万一某些奇怪的内容被缓存在某处。

Try deleting your .user and .suo files - these are the user options files that VS creates. You get a .user file for each project and a .suo file for your solution. When they get corrupted, odd things happen. Deleting them will make you lose little things like which project is selected as the startup project when you start debugging, but it usually clears up odd behavior like this.

You may also want to clear out any temporary file locations, like the Temporary ASP.NET Files folders (if you're working in ASP.NET) just in case something odd is being cached somewhere.

喜爱皱眉﹌ 2024-07-13 03:57:39

如果您怀疑 .suo 文件已损坏且与 Source Safe 集成,请当心。

当您在崩溃后重新启动 VS 时,您可能会收到以下消息:

从源代码管理打开操作仍在进行中,但您现在可以开始工作。 其余项目将异步检索。

这基本上意味着 VS 将从 Source Safe 加载打开的解决方案中的所有项目,并覆盖任何签出并包含的文件未签入的更改!

VS 崩溃后,独立启动 Source Safe 并检查您想要保留的内容。

然后在再次启动 VS 之前修复损坏。

Beware if you suspect a corrupt .suo file and are integrated with Source Safe.

When you restart VS after a crash, you may get the following message:

The Open from Source Control operation is still in progress but you can start working now. the rest of the projects will be retrieved asynchronously.

This basically means VS will load all projects in your opened solution from Source Safe and Overwrite any files that are checked out and contain unchecked-in changes!

After a VS crash, start Source Safe standalone and CHECK IN what you want to preserve.

Then work at fixing the corruption before starting VS again.

像极了他 2024-07-13 03:57:39

最常见的是,如果 Visual Studio 反复崩溃,则表明您的 .suo 或 .ncb 文件已损坏。 关闭您的项目,删除这些文件,然后重新打开。 这可能会解决您的问题。

.suo 是一个隐藏文件。

Most commonly, if Visual Studio is crashing repeatedly, your .suo or .ncb file has become corrupted. Close your project, delete those files, and reopen. This may resolve your problem.

.suo is a hidden file.

黑寡妇 2024-07-13 03:57:39

如果 .suo 或 .ncb 文件已损坏,也会导致 Visual Studio 崩溃。
要解决此崩溃问题,您可以使用图中提到的以下步骤。

  1. 转到包含 Visual Studio 执行文件 (devenv.exe) 的文件夹。
  2. 使用步骤一中提到的文件夹路径打开命令提示符,然后运行命令 devenv.exe /ResetSettings。
  3. 如果步骤二不能解决您的问题,则运行命令 devenv.exe /重置用户数据。

输入图片此处描述

If .suo or .ncb file has become corrupted, that causes for visual studio crashing also.
To solve this crashing you can use the following step as mentioned in the image.

  1. Go to the folder that contain visual studio execution file(devenv.exe).
  2. open the command prompt with the folder path mentioned in the step one and run the command devenv.exe /ResetSettings.
  3. If step two doesn't solve your problem then run the command devenv.exe /ResetUserData.

enter image description here

苦妄 2024-07-13 03:57:39

我发现即使在 SP1 中,在向项目添加内容时也很少崩溃,但主要是在切换到 ASP.NET 设计视图以及在工具中自动生成控件时崩溃。 我刚刚禁用它来创建它们,并且我不再遇到很多崩溃。

我知道这与您的问题没有太大关系,但我制作 SP1 的要点可能并不能解决您的问题。

I Find on mine even in SP1 that it crashes rarely when adding stuff to a project, but mainly when switching to an ASP.NET Design View and when it autogenerates controls in the tools. I just disabled it from creating them and i dont get many crashes any more.

I know this doesnt have much to do with your issue, but the point i am making SP1 may not be the answer to your problem.

情话已封尘 2024-07-13 03:57:39

搜索并删除与您的解决方案关联的任何 .ncb 文件。 在过去的版本中,这些(调试)文件常常会损坏,删除它们可以解决问题(Visual Studio 将自动重新生成它们)。

Search for and delete any .ncb files associated with your solution. In past versions these (debugging) files used to get corrupt and deleting them would fix the problem (Visual Studio will regenerate them automatically).

执着的年纪 2024-07-13 03:57:39

希望这对某人有帮助。 感觉就像我已经尝试了一切。 我什至修复了安装,这没有什么区别,并且完全删除了 VS,但问题仍然存在。 日志选项没有告诉我任何重要信息,因此我最终删除了解决方案中的所有 bin 和 obj 文件夹以及所有 .suo 和 .user 文件,并将其移至硬盘驱动器上根文件夹之外的完全不同的文件夹中,然后重建它。 它神奇地来对了!

Hopefully this helps someone. It felt like I had tried everything. I even repaired the installation, which made no difference as well as removed VS entirely and the issue was still there. The log option told me nothing significant, so I eventually deleted all the bin and obj folders in my solution as well as all the .suo and .user files and moved it to a completely different folder off the root folder on my harddrive and rebuilt it. It magically came right!

抚笙 2024-07-13 03:57:39

我尝试了所有建议的选项,并在此找到了更多选项 链接。 没有运气。

然后我尝试添加来自网站(而不是网络应用程序)的引用。 过程有所不同:您必须右键单击项目并转到“属性页”,“引用”选项卡上有一个 添加... 按钮。

它仍然崩溃了,但是这次事件查看器中出现了一条消息,指出我已安装的第 3 方组件中 DLL 的完整路径。 无法从磁盘读取 DLL(已损坏)。 因此,修复该库并稍后重新启动,我就恢复正常了。

更新:

我开始找出真正的原因,我的 SSD 上的几个文件已损坏。 CHKDSK /R 让我恢复了一段时间。 最终不得不更换驱动器。 只是提醒一下,这可能不是 VS 的错。

I tried all of the suggested options, and a few more found at this link. No luck.

Then I tried to add a reference from a Web Site (as opposed to Web App). The process is different: you have to right click the project and go to Property Pages, and there's an Add... button on the References tab.

It still crashed, but there was a message in the Event Viewer this time that pointed me to the full path of a DLL in a 3rd party component I have installed. The DLL couldn't be read from disk (corrupt). So, a repair of that lib and a reboot later, and I'm back to good.

UPDATE:

I came to find out the real reason, several files on my SSD had become corrupt. CHKDSK /R got me back going for a while. Eventually had to replace the drive. Just a reminder that it may not be VS's fault.

倾城月光淡如水﹏ 2024-07-13 03:57:39

更改默认解决方案位置解决了我的问题。

changing the default solution location solved my problem.

岁吢 2024-07-13 03:57:39

我必须删除解决方案中不再存在的项目的旧参考,这对我来说效果很好。

I had to remove older reference for the project that no longer existed from the solution and that worked fine for me.

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