mhutch / MonoDevelop.MSBuildEditor

Improved MSBuild editing support
Other
228 stars 26 forks source link

Error when file opened by solution load #231

Open mhutch opened 6 months ago

mhutch commented 6 months ago

When an MSBuild file was open when the solution was closed, VS automatically reopens it when the solution is loaded again. This can fail with the following error:

An error occurred in 'MonoDevelop.Xml.Core.Tests' while attempting to open 'MonoDevelop.Xml.Core.Tests.csproj'
System.Runtime.InteropServices.COMException (0x80041FEA): Exception from HRESULT: 0x80041FEA
   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   at Microsoft.VisualStudio.PlatformUI.Packages.ShellService.EditorFactories.EditorFactory.<CreateEditorInstanceAsync>d__43.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.<>c__DisplayClass84_0.<<CreateEditorInstanceAsync>g__CreateEditorInstanceAsync|1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.<CreateEditorInstanceAsync>d__84.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.<LoadDocumentFrameInternalAsync>d__83.MoveNext()