jeffdapaz / VisualChatGPTStudio

Add chatGPT functionalities directly on Visual Studio
https://marketplace.visualstudio.com/items?itemName=jefferson-pires.VisualChatGPTStudio
MIT License
224 stars 55 forks source link

Does not work in VS 17.12.0 #93

Open djjsdtc opened 2 days ago

djjsdtc commented 2 days ago

After upgrading Visual Studio 2022 to v17.12.0, the plugin stops working. image

And in ActivityLog.xml file, it records the following error:


System.Runtime.InteropServices.COMException (0x80049283): 异常来自 HRESULT:0x80049283
   在 Microsoft.VisualStudio.Shell.Interop.IVsShell5.LoadPackageWithContext(Guid& packageGuid, Int32 reason, Guid& context)
   在 Microsoft.VisualStudio.Platform.WindowManagement.WindowManagerService.CreateContentPane(String pszName, Int32 fDockViewOn, Int32 fDocument, String lpstrMkDoc, UInt32 eCreateWindowFlags, UInt32 dwToolWinId, Object punkView, Object punkData, IServiceProvider pServiceProvider, IVsUIHierarchy pUIHierarchy, UInt32 vsid, Int32& pfDefaultPosition, Guid& rguidCmdUI, IVsWindowFrame& ppWindowFrame)
   在 System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   在 Microsoft.VisualStudio.Shell.Package.CreateFrameForToolWindow(ToolWindowCreationResult result, Int32 id, Guid persistenceGuid)
   在 Microsoft.VisualStudio.Shell.Package.<>c__DisplayClass74_0.<CreateToolWindow>g__CreateToolWindowWorker|1()
   在 Microsoft.VisualStudio.Shell.Package.CreateToolWindow(Type toolWindowType, Int32 id, UInt32 flags, Object context, Guid persistenceGuid)
   在 Microsoft.VisualStudio.Shell.AsyncPackage.<CreateToolWindowAsync>d__22.MoveNext()
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
   在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   在 Microsoft.VisualStudio.Shell.AsyncPackage.<>c__DisplayClass31_0.<<FindToolWindowAsync>b__0>d.MoveNext()
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
   在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   在 Microsoft.VisualStudio.Shell.ToolWindowCollection.ToolWindowListener.<>c__DisplayClass1_0.<<-ctor>b__0>d.MoveNext()
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
   在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   在 Microsoft.VisualStudio.Threading.AwaitExtensions.ExecuteContinuationSynchronouslyAwaiter`1.GetResult()
   在 Microsoft.VisualStudio.Threading.AsyncLazy`1.<>c__DisplayClass20_0.<<GetValueAsync>b__0>d.MoveNext()
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
   在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   在 Microsoft.VisualStudio.Shell.AsyncPackage.<FindToolWindowAsync>d__31.MoveNext()
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
   在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   在 Microsoft.VisualStudio.Shell.AsyncPackage.<FindToolWindowAsync>d__29.MoveNext()
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
   在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   在 JeffPires.VisualChatGPTStudio.Commands.TerminalWindowCommand.<InitializeToolWindowAsync>d__12.MoveNext() 位置 C:\Source\GIT\VisualChatGPTStudio\VisualChatGPTStudioShared\Commands\TerminalWindowCommand.cs:行号 111
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
   在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   在 JeffPires.VisualChatGPTStudio.Commands.TerminalWindowCommand.<InitializeAsync>d__9.MoveNext() 位置 C:\Source\GIT\VisualChatGPTStudio\VisualChatGPTStudioShared\Commands\TerminalWindowCommand.cs:行号 72
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
   在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   在 JeffPires.VisualChatGPTStudio.VisuallChatGPTStudioPackage.<InitializeAsync>d__8.MoveNext() 位置 C:\Source\GIT\VisualChatGPTStudio\VisualChatGPTStudioShared\VisuallChatGPTStudioPackage.cs:行号 64
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
   在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   在 Microsoft.VisualStudio.Shell.AsyncPackage.<>c__DisplayClass17_0.<<Microsoft-VisualStudio-Shell-Interop-IAsyncLoadablePackageInitialize-Initialize>b__1>d.MoveNext()
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
   在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   在 Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e)
   在 Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck)```
jeffdapaz commented 2 days ago

@djjsdtc,

thanks to advising me, I updated my VS and I faced the same error.

I will analyse and try to provide a fix as soon as possible.

tadrian commented 1 day ago

thanks, I have the same problem

karburator commented 1 day ago

Hi, @jeffdapaz probable cause of issue is twice window initialization, that could be called here

AsyncPackage.FindToolWindowAsync Method can create object if one doesn't exist

jeffdapaz commented 1 day ago

Hi, @jeffdapaz probable cause of issue is twice window initialization, that could be called here

AsyncPackage.FindToolWindowAsync Method can create object if one doesn't exist

Thanks @karburator, when I get on this to resolve, I will look in this detail that you provided.