Reavert / VisualStudioDiscordRPC

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

The 'VisualStudioDiscordRPCPackage' package did not load correctly #16

Closed JoshuaMaitland closed 2 years ago

JoshuaMaitland commented 2 years ago

After I installed that extension on Visual Studio 2022, I get this message popped up every time telling me that it did not load correctly. And I'm not so sure how I would fix it!! (Username has been removed). The version that I'm using is v1.3.3 devenv_2022-07-06_20-17-34

Reavert commented 2 years ago

Can you attach this file here?

timing1337 commented 2 years ago

Also got the issue here, I'm not sure if he has the same problem as me, but for my case:

<entry>
    <record>365</record>
    <time>2022/07/07 04:57:48.208</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>SetSite failed for package [VisualStudioDiscordRPCPackage]Source: &apos;VisualStudioDiscordRPC.Dev17&apos; Description: Could not load file or assembly &apos;Microsoft.VisualStudio.Threading, Version=17.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&apos; or one of its dependencies. The system cannot find the file specified.&#x000D;&#x000A;System.IO.FileNotFoundException: Could not load file or assembly &apos;Microsoft.VisualStudio.Threading, Version=17.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&apos; or one of its dependencies. The system cannot find the file specified.&#x000D;&#x000A;File name: &apos;Microsoft.VisualStudio.Threading, Version=17.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&apos;&#x000D;&#x000A;   at VisualStudioDiscordRPC.Shared.VisualStudioDiscordRPCPackage.InitializeAsync(CancellationToken cancellationToken, IProgress`1 progress)&#x000D;&#x000A;   at Microsoft.VisualStudio.Shell.AsyncPackage.&lt;&gt;c__DisplayClass20_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 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Threading.JoinableTask.&lt;JoinAsync&gt;d__76.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)&#x000D;&#x000A;&#x000D;&#x000A;WRN: Assembly binding logging is turned OFF.&#x000D;&#x000A;To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.&#x000D;&#x000A;Note: There is some performance penalty associated with assembly bind failure logging.&#x000D;&#x000A;To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].&#x000D;&#x000A;</description>
    <guid>{5CD3D640-3D33-45EA-8C5B-6DE981FF9900}</guid>
    <hr>80070002</hr>
    <errorinfo></errorinfo>
  </entry>
sametguzeldev commented 2 years ago

Can you attach this file here?

I have the same issue. Here is the file. ActivityLog.zip

sametguzeldev commented 2 years ago

This is the error that I see. Seems like it cannot find Microsoft.VisualStudio.Threading dll image

Reavert commented 2 years ago

Maybe something with an automated build in GitHub Actions. I built .vsix manually. Can you try installing this one?

VisualStudioDiscordRPC.Dev17.zip

sametguzeldev commented 2 years ago

Maybe something with an automated build in GitHub Actions. I built .vsix manually. Can you try installing this one?

VisualStudioDiscordRPC.Dev17.zip

Still the same error. image

sametguzeldev commented 2 years ago

I downloaded the older version Discord RPC for Visual Studio v1.3.1 which is working btw. Seems to be something in the new version.

JoshuaMaitland commented 2 years ago

Maybe something with an automated build in GitHub Actions. I built .vsix manually. Can you try installing this one?

VisualStudioDiscordRPC.Dev17.zip

Tried that and it doesn't work. Still the same issue. But I attached the ActivityLog anyway. ActivityLog.zip

sametguzeldev commented 2 years ago

Maybe something with an automated build in GitHub Actions. I built .vsix manually. Can you try installing this one? VisualStudioDiscordRPC.Dev17.zip

Tried that and it doesn't work. Still the same issue. But I attached the ActivityLog anyway. ActivityLog.zip

Can you try the older version which is Discord RPC for Visual Studio v1.3.1 and see if it works for you?

sametguzeldev commented 2 years ago

Maybe something with an automated build in GitHub Actions. I built .vsix manually. Can you try installing this one?

VisualStudioDiscordRPC.Dev17.zip

I've checked the commits and saw that there are libraries added to the project. Maybe they are depending on that version or something?

I did modify the csproj file and gave the version and the path for that dll but still the same error. I am suspecting that another dll/library is trying to get that version.

JoshuaMaitland commented 2 years ago

Maybe something with an automated build in GitHub Actions. I built .vsix manually. Can you try installing this one? VisualStudioDiscordRPC.Dev17.zip

Tried that and it doesn't work. Still the same issue. But I attached the ActivityLog anyway. ActivityLog.zip

Can you try the older version which is Discord RPC for Visual Studio v1.3.1 and see if it works for you?

I actually using v1.3.2 and it does works and doesn't show a warning message at all at startup!!

sametguzeldev commented 2 years ago

Maybe something with an automated build in GitHub Actions. I built .vsix manually. Can you try installing this one? VisualStudioDiscordRPC.Dev17.zip

Tried that and it doesn't work. Still the same issue. But I attached the ActivityLog anyway. ActivityLog.zip

Can you try the older version which is Discord RPC for Visual Studio v1.3.1 and see if it works for you?

I actually using v1.3.2 and it does works and doesn't show a warning message at all at startup!!

If you click "No" to this pop-up, you will not see the warning message anymore. You need to reinstall to see that warning message again. image

JoshuaMaitland commented 2 years ago

Maybe something with an automated build in GitHub Actions. I built .vsix manually. Can you try installing this one? VisualStudioDiscordRPC.Dev17.zip

Tried that and it doesn't work. Still the same issue. But I attached the ActivityLog anyway. ActivityLog.zip

Can you try the older version which is Discord RPC for Visual Studio v1.3.1 and see if it works for you?

I actually using v1.3.2 and it does works and doesn't show a warning message at all at startup!!

If you click "No" to this pop-up, you will not see the warning message anymore. You need to reinstall to see that warning message again.

That warning message didn't show up on v1.3.2 and when I checked on my Discord activity, it does indeed works. Also I disabled the checkbox and restarted Visual Studio 2022 and the warning message is no longer showing up. devenv_2022-07-07_11-59-37

Reavert commented 2 years ago

I've been updating Extension Build Tools and updating Newtonsoft's JSON. I'll try to make a downgrad. VisualStudioDiscordRPC.Dev17_downgraded.zip

JoshuaMaitland commented 2 years ago

I've been updating Extension Build Tools and updating Newtonsoft's JSON. I'll try to make a downgrad. VisualStudioDiscordRPC.Dev17_downgraded.zip

I think that worked successfully. No warning message at startup. Checked my discord activity and it is showing that I'm playing Visual Studio. So as least that I can say is. IT WORKS!!! Thanks for fixing this.

Reavert commented 2 years ago

It's strange that updating the build tools broke this. I think it's also related to the Visual Studio version. The build tools were with version 17.2, I have reduced it to 17.0.

Reavert commented 2 years ago

Hello, guys! Recently, such error messages have started to appear frequently again. Do you have such a problem?

Reavert commented 2 years ago

The problem is in different versions of Visual Studio and packages in the extension. Solution: to install a newer version of Visual Studio.