0
When I edit HomeController.cs, VS 2010 complain something like "can not nevigation directory" (I don't remember exactly the sentence, because the visual studio cannot be open any more for that solution), and did not allow me to edit the file. I close the file and open it again, it still the same.

So I closed the VS 2010, and try to reopen it, the solution cannot be opened anymore,Vitual studio always shows an "Unhandled Exception" window with error message as follows. 

Anyone have idea how can I fix this and where to report the error.

The error message:

Unhandled Exception

Visual Studio 或已安装的扩展之一引发未处理的异常,应关闭。错误报告已创建,可以发送给开发团队或扩展作者进行修复。

Exception Type: System.AggregateException
Exception Message: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread.
Exception Stack Trace:    at System.Threading.Tasks.TaskExceptionHolder.Finalize()
Inner Exception:
Exception Type: System.InvalidOperationException
Exception Message: The calling thread cannot access this object because a different thread owns it.
Exception Stack Trace:    at System.Windows.Threading.Dispatcher.VerifyAccess()
at System.Windows.DependencyObject.GetValue(DependencyProperty dp)
at System.Windows.Controls.Panel.get_IsItemsHost()
at System.Windows.Controls.Panel.VerifyBoundState()
at System.Windows.Controls.Panel.get_InternalChildren()
at Microsoft.VisualStudio.Text.Editor.Implementation.AdornmentLayer.RemoveTranslatableVisual(AdornmentAndData data)
at Microsoft.VisualStudio.Text.Editor.Implementation.AdornmentLayer.RemoveAllAdornments()
at IndentGuide.IndentGuideView.UpdateAdornments()
at IndentGuide.IndentGuideView.UpdateAdornmentsCallback(Task task)
at System.Threading.Tasks.Task.<>c__DisplayClassb.<ContinueWith>b__a(Object obj)
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()


-------------------------

Installed Extensions
LINQ Insight
State   =   Enabled
Version =   1.0

NuGet Package Manager
State   =   Enabled
Version =   1.8.30423.9026

JSEnhancements
State   =   Enabled
Version =   1.4.1

Word Wrap with Auto-Indent
State   =   Enabled
Version =   1.0

Remove And Sort Using
State   =   Enabled
Version =   1.4

devColor
State   =   Enabled
Version =   2.0

Find Results Highlighter
State   =   Enabled
Version =   1.0

VSFileNav
State   =   Enabled
Version =   11.2

CSSCop - FxCop for Stylesheets
State   =   Enabled
Version =   1.2

Image Optimizer
State   =   Enabled
Version =   1.9

Web Essentials
State   =   Enabled
Version =   2.7

PowerCommands for Visual Studio 2010
State   =   Enabled
Version =   1.0.2.3

Go To Definition
State   =   Enabled
Version =   2.4

Triple Click
State   =   Enabled
Version =   2.1

Sample Browser Visual Studio Extension
State   =   Enabled
Version =   5.815

Spell Checker
State   =   Enabled
Version =   2.24

Snip2Code
State   =   Enabled
Version =   1.1

VSCommands for Visual Studio 2010
State   =   Enabled
Version =   10.3.9.12

Indent Guides
State   =   Enabled
Version =   12.1

Activity Diagram
State   =   Enabled
Version =   1.0

Class Diagrams
State   =   Enabled
Version =   1.0

Component Diagram
State   =   Enabled
Version =   1.0

Persistence Diagram
State   =   Enabled
Version =   1.0

State Diagram
State   =   Enabled
Version =   1.0

t4 editor
State   =   Enabled
Version =   2.1.1

Use-Case Diagram
State   =   Enabled
Version =   1.0



-------------------------

Environment Data
VisualStudio.Version    =   10.0
VisualStudio.Edition    =   Ultimate
VisualStudio.FullName   =   c:\Program Files (x86)\Microsoft 
Visual Studio 10.0\Common7\IDE\devenv.exe
VisualStudio.RegistryRoot   =   Software\Microsoft\VisualStudio\10.0
VisualStudio.LocaleId   =   1033
VisualStudio.DisplayMode    =   vsDisplayMDITabs
Time.UTC    =   4/21/2013 1:58:40 AM
Time.Local  =   4/21/2013 9:58:40 AM
OS.Architecture =   AMD64
Environment.Version =   4.0.30319.296
Environment.HasShutdownStarted  =   False
Environment.OSVersion.Platform  =   Win32NT
Environment.OSVersion   =   6.1.7601.65536
CurrentThread.Id    =   1
CurrentThread.Name  =   [null]
CurrentThread.ThreadState   =   Background, WaitSleepJoin
CurrentThread.IsBackground  =   True
CurrentThread.UICulture =   English (United States)
CurrentThread.Culture   =   English (United States)
Process.PagedMemorySizeMB   =   439.88671875
Process.MaxWorkingSetMB =   1.34765625
Process.NonpagedSystemMemorySizeMB  =   0.201393127441406
Process.PagedSystemMemorySizeMB =   1.76486206054688
Process.PrivateMemorySizeMB =   439.88671875
Process.VirtualMemorySizeMB =   1254.84375
Process.WorkingSetMB    =   516.3984375
Process.UpTime  =   00:00:35.6518000
4

1 回答 1

2

Stacktrace 表明错误来自缩进指南扩展。尝试禁用它并重新启动 Visual Studio。

于 2013-04-21T07:43:21.060 回答