visual-studio 正在跳过文档加载 - 什么文档导致了这种情况?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/556669/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 10:10:00  来源:igfitidea点击:

Document load is being skipped - what document is causing this?

visual-studiovisual-studio-2008

提问by Johnno Nolan

when loading up a solution in VS2008 I get:

在 VS2008 中加载解决方案时,我得到:

An error was encountered while opening associated documents the last time this solution was loaded. Document load is being skipped during this solution load in order to avoid that error.

上次加载此解决方案时打开相关文档时遇到错误。在此解决方案加载期间将跳过文档加载以避免该错误。

How can I find which document is causing the problem?

如何找到导致问题的文档?

回答by Pedro

I can't say I've seen this particular error, but I'm wondering if that might be stored in the .suo file associated with your solution. The .suo is where VS tracks which files you had open previously, so maybe it tracks failed ones as well. You might try renaming or deleting that file and then reloading the solution to see if the error goes away. Unfortunately, those files aren't entirely human-readable, so if that proves to be the location, it may not be trivial to determine which file was at fault.

我不能说我见过这个特定的错误,但我想知道它是否可能存储在与您的解决方案关联的 .suo 文件中。.suo 是 VS 跟踪您之前打开的文件的地方,因此它可能也跟踪失败的文件。您可以尝试重命名或删除该文件,然后重新加载解决方案以查看错误是否消失。不幸的是,这些文件并不完全是人类可读的,因此如果证明是该位置,则确定哪个文件有问题可能并非易事。

回答by Wesley

I cleaned my solution via Build->Clean Solution.

我通过 Build->Clean Solution 清理了我的解决方案。

Then I rebuilded my solution. Seems to work for me.

然后我重建了我的解决方案。似乎对我有用。

edit: i use VS 2010

编辑:我使用 VS 2010

回答by dubbySwords

I'm using VS2010 and had the same fault. I removed the 2 SUO files associated to the solution and it worked fine.

我正在使用 VS2010 并且有同样的错误。我删除了与解决方案关联的 2 个 SUO 文件,并且运行良好。

回答by Charlie Flowers

I've been shut down by this problem all morning, so I've been doing some forced research. here's a tidbit that may help, along with some links I've found (but IO haven't read them all yet).

我整个上午都被这个问题关闭了,所以我一直在做一些强制研究。这是一个可能有帮助的花絮,以及我找到的一些链接(但 IO 还没有全部阅读)。

First of all, the tidbit. It seems that if I can get the solution to open at all (which I can, the second time, when VS.NET skips the "Document loading" step), and then immediately do a Rebuild All, that might "fix" the problem (meaning, the problem will go away for a while and show up a few days later, but at least I can get some work done).

首先是花絮。看来,如果我可以完全打开解决方案(我可以,第二次,当 VS.NET 跳过“文档加载”步骤时),然后立即进行“全部重建”,这可能会“解决”问题(意思是,问题会消失一段时间并在几天后出现,但至少我可以完成一些工作)。

Of course, that may turn out to be a red herring, but it appears to hold true right now.

当然,这可能会被证明是一个转移注意力的问题,但现在看来确实如此。

Next, here are some links I've found. I haven't read all of them, but they are about this problem or very similar ones, and they may help somebody.

接下来,这是我找到的一些链接。我没有阅读所有这些,但它们是关于这个问题或非常相似的问题,它们可能会帮助某人。

http://social.msdn.microsoft.com/forums/en-US/vssetup/thread/cb73c8d6-077f-4220-aaf8-463039ee1d5f

http://social.msdn.microsoft.com/forums/en-US/vssetup/thread/cb73c8d6-077f-4220-aaf8-463039ee1d5f

Why does Visual Studio crash opening ASPX with MVC RC1

为什么 Visual Studio 使用 MVC RC1 打开 ASPX 会崩溃

Resharper (R#) 4.5 and MVC (1.0) solutions cause Visual Studio 2008 SP1 to crash on solution load

Resharper (R#) 4.5 和 MVC (1.0) 解决方案导致 Visual Studio 2008 SP1 在解决方案加载时崩溃

http://www.lostechies.com/blogs/hex/archive/2009/03/02/hot-fix-available-for-visual-studio-2008-sp1-crashing-when-opening-up-aspx-files-views-on-vista-sp1-x64.aspx

http://www.lostechies.com/blogs/hex/archive/2009/03/02/hot-fix-available-for-visual-studio-2008-sp1-crashing-when-opening-up-aspx-files- view-on-vista-sp1-x64.aspx

http://www.chowamigo.co.uk/2009/10/fix-visual-studio-hangs-crashes-and.html

http://www.chowamigo.co.uk/2009/10/fix-visual-studio-hangs-crashes-and.html

http://forums.asp.net/p/1384470/2942121.aspx#2942121

http://forums.asp.net/p/1384470/2942121.aspx#2942121

http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=471570

http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=471570

http://blogs.msdn.com/jnak/archive/2009/02/26/fix-available-asp-net-mvc-rc-crash-in-a-windows-azure-cloud-service-project.aspx

http://blogs.msdn.com/jnak/archive/2009/02/26/fix-available-asp-net-mvc-rc-crash-in-a-windows-azure-cloud-service-project.aspx

回答by meklarian

It may not be possible to definitely determine which file is causing the issue. Similar errors have been reported with widely varying circumstances, except for the condition where there is at least 1 file that was still open for editing at the last time the solution was successfully opened and closed.

可能无法确定是哪个文件导致了问题。类似的错误已在广泛不同的情况下报告,除了在上次成功打开和关闭解决方案时至少有 1 个文件仍处于打开状态以供编辑的情况。

I've looked at this myself with WinDbg active, and the call stack is filled with a chain of DLLs in thread/module unload state. Most likely this is being caused by a race condition or other faulty multi-threading behavior in visual studio.

我在 WinDbg 处于活动状态的情况下自己查看了这个,并且调用堆栈中充满了处于线程/模块卸载状态的 DLL 链。这很可能是由 Visual Studio 中的竞争条件或其他错误的多线程行为引起的。

Here are other references you can view, in case others update them with additional information.

以下是您可以查看的其他参考资料,以防其他人使用其他信息更新它们。

IDE Reports Error ... @ Microsoft Connect
Error Loading Solution 100% of the time ... @ Microsoft Connect
Error opening associated documents ... @ Stack Overflow

IDE 报告错误...@Microsoft Connect
错误加载解决方案 100% 的时间...@Microsoft Connect
错误打开相关文档...@ Stack Overflow

Edit:

编辑:

I should add that my conclusion of this being a race condition is based upon clues gathered while trying to create a minidump of the crash in Visual Studio with WinDbg; and prior history with similar unexplained bugs in older versions of Visual Studio.

我应该补充一点,我的结论是基于在尝试使用 WinDbg 在 Visual Studio 中创建崩溃的小型转储时收集的线索;和以前的历史,在旧版本的 Visual Studio 中存在类似的无法解释的错误。

In my exploration, WinDbg consistently reports that a minidump cannot be created for this crash because ReadProcessMemoryhas failed. The stack trace contains a trail of DllUnloads called for various reasons. There are no reports of this bug happening when there are no document views that were open at the last time the solution was closed. In combining these clues, my guess is that there are bugs in the order of instantiation; perhaps as two views of the same type are opened, one completes ahead of the other and causes the cleanup of a resource that is shared by both actions.

在我的探索中,WinDbg 始终报告无法为此崩溃创建小型转储,因为ReadProcessMemory已失败。堆栈跟踪包含因各种原因调用的 DllUnloads 跟踪。当上次关闭解决方案时没有打开的文档视图时,没有发生此错误的报告。综合这些线索,我的猜测是实例化顺序有bug;可能当打开相同类型的两个视图时,一个在另一个之前完成并导致两个操作共享的资源的清理。

It is possible that this isn't a race condition or threading bug, though the symptoms strongly suggest it. Fortunately for myself and others who have chimed in with answers, when I've encountered this bug, deleting the .SUO file (and .NCB file in older versions of Visual Studio) fixes the problem.

这可能不是竞争条件或线程错误,尽管症状强烈表明它。幸运的是,对于我自己和其他回答问题的人来说,当我遇到此错误时,删除 .SUO 文件(以及旧版 Visual Studio 中的 .NCB 文件)修复了该问题。

回答by meklarian

I had this issue as well. I deleted the *.suo file associated with the solution. When I attempted to load the solution again I was prompted with the same error except that this time Visual Studio didn't crash instantly. When I clicked "ok" on the error dialog the solution seemed to load just fine.

我也有这个问题。我删除了与解决方案关联的 *.suo 文件。当我再次尝试加载解决方案时,我收到了同样的错误提示,只是这次 Visual Studio 没有立即崩溃。当我在错误对话框上单击“确定”时,解决方案似乎加载得很好。

回答by vapcguy

Received this "document load skipped" error, then an "object reference not set to an instance of an object" error when I tried to close VS. I fixed both by deleting:

收到此“跳过文档加载”错误,然后在我尝试关闭 VS 时收到“未将对象引用设置为对象的实例”错误。我通过删除来修复两者:

  • C:\Users{user}\AppData\Local\Microsoft\VisualStudio\ComponentModelCache and
  • C:\Users{user}\AppData\Local\Microsoft\VisualStudio\devenv.exe.config
  • C:\Users{user}\AppData\Local\Microsoft\VisualStudio.NETFramework,Version=v4.0,Set=Extensions,Hash=6D09DECC.dat
  • C:\Users{user}\AppData\Local\Microsoft\VisualStudio.NETFramework,Version=v4.0,Set=Extensions,Hash=9951BC03.dat
  • C:\Users{user}\AppData\Local\Microsoft\VisualStudio.NETFramework,Version=v4.5.2,Set=RecentAssemblies,Hash=0.dat
  • C:\Users{user}\AppData\Local\Microsoft\VisualStudio\ComponentModelCache 和
  • C:\Users{用户}\AppData\Local\Microsoft\VisualStudio\devenv.exe.config
  • C:\Users{user}\AppData\Local\Microsoft\VisualStudio.NETFramework,Version=v4.0,Set=Extensions,Hash=6D09DECC.dat
  • C:\Users{user}\AppData\Local\Microsoft\VisualStudio.NETFramework,Version=v4.0,Set=Extensions,Hash=9951BC03.dat
  • C:\Users{user}\AppData\Local\Microsoft\VisualStudio.NETFramework,Version=v4.5.2,Set=RecentAssemblies,Hash=0.dat

I found those first two were causing other errors related to missing packages when I'd load up my project, and the "object reference not set to an instance of an object" when trying to close VS, and was receiving errors from the JavaScript Language Service, complaining of missing js files from those last .NETFramework files (which I do not get if I do not add them back in):

我发现前两个在我加载项目时导致与丢失包相关的其他错误,以及在尝试关闭 VS 时“对象引用未设置为对象的实例”,并且从 JavaScript 语言接收错误服务,抱怨从那些最后的 .NETFramework 文件中丢失了 js 文件(如果我不重新添加它们,我就不会得到这些文件):

01:10:11.7550: Referenced file 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\JavaScript\References\libhelp.js' not found.
01:10:11.7550: Referenced file 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\JavaScript\References\sitetypesWeb.js' not found.
01:10:11.7550: Referenced file 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\JavaScript\References\domWeb.js' not found.
01:10:11.7550: Referenced file 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\JavaScript\References\underscorefilter.js' not found.
01:10:11.7550: Referenced file 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\JavaScript\References\showPlainComments.js' not found.

I might just need to re-install/repair the JavaScript Language Service plug-in, and it's possible those were the files getting "skipped". But I would try getting rid of all of the files I listed above and restarting Visual Studio. They should get re-created, except for the .NETFramework files. If you like, you can back the .NETFramework files up, then delete them, and then paste them back in one at a time and relaunch VS between each file copy-back that you do, to narrow things down, as I did.

我可能只需要重新安装/修复 JavaScript 语言服务插件,这些文件可能会被“跳过”。但是我会尝试删除上面列出的所有文件并重新启动 Visual Studio。它们应该重新创建,除了 .NETFramework 文件。如果您愿意,您可以备份 .NETFramework 文件,然后删除它们,然后一次将它们粘贴回一个,并在您执行的每个文件复制之间重新启动 VS,以缩小范围,就像我所做的那样。

Posted my process I used to figure this out at Visual Studio 2015 error "Object reference not set to an instance of an object" after install of ASP.NET and Web Tools 2015 (RC1 Update 1)

在安装 ASP.NET 和 Web Tools 2015(RC1 更新 1)后,发布了我曾经在Visual Studio 2015 错误“对象引用未设置为对象的实例”中解决此问题的过程