Reavert / VisualStudioDiscordRPC

Discord rich presence for Visual Studio with support for 2019 and 2022 versions.
https://marketplace.visualstudio.com/publishers/Ryavel
MIT License
74 stars 9 forks source link

VisualStudioDiscordRPCPackage did not load correctly #39

Closed Aqqly closed 1 year ago

Aqqly commented 1 year ago

Hello,

I've used your extension in the past without problems. Recently I started using VS again and I noticed that the Discord RPC doesn't work anymore. I'm on the latest version.

I hope you can fix it.

  <entry>
    <record>172</record>
    <time>2023/07/24 05:15:34.245</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>SetSite failed for package [VisualStudioDiscordRPCPackage]Source: &apos;Microsoft.VisualStudio.Interop&apos; Description: Error HRESULT E_FAIL has been returned from a call to a COM component.&#x000D;&#x000A;System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.&#x000D;&#x000A;   at EnvDTE.Events.get_DebuggerEvents()&#x000D;&#x000A;   at VisualStudioDiscordRPC.Shared.Slots.TextSlots.DebuggingSlot..ctor(DTE2 dte)&#x000D;&#x000A;   at VisualStudioDiscordRPC.Shared.Services.Models.SlotService..ctor()&#x000D;&#x000A;   at VisualStudioDiscordRPC.Shared.PackageController.RegisterServices()&#x000D;&#x000A;   at VisualStudioDiscordRPC.Shared.PackageController.Init()&#x000D;&#x000A;   at VisualStudioDiscordRPC.Shared.VisualStudioDiscordRPCPackage.&lt;InitializeAsync&gt;d__2.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Shell.AsyncPackage.&lt;&gt;c__DisplayClass21_0.&lt;&lt;Microsoft-VisualStudio-Shell-Interop-IAsyncLoadablePackageInitialize-Initialize&gt;b__1&gt;d.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e)&#x000D;&#x000A;   at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck)</description>
    <guid>{5CD3D640-3D33-45EA-8C5B-6DE981FF9900}</guid>
    <hr>0x80004005 - E_FAIL</hr>
    <errorinfo></errorinfo>
  </entry>
Reavert commented 1 year ago

Thanks for providing the error log.

The error occurred at a lower level - when accessing Visual Studio components. Perhaps the problem is not with the extension. Do you have any steps to reproduce this bug?

Aqqly commented 1 year ago

I'm not sure what the exact cause was, because at first I thought it was directly related to VS, but I eventually managed to fix it by reinstalling Windows SDK. Thank you for thinking along, though.