-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Package did not load correctly" on direct loading some solutions/projects #45
Comments
Hi. |
aha. In which case I'll attach my current settings below: {
"RichPresenceEnabled": true,
"Language": "English",
"LargeIconPlug": "ExtensionIconPlug",
"SmallIconPlug": "VisualStudioVersionIconPlug",
"DetailsPlug": "SolutionNameTextPlug",
"StatePlug": "ProjectNameTextPlug",
"TimerPlug": "ApplicationScopeTimerPlug",
"FirstButtonPlug": "GitRepositoryButtonPlug",
"SecondButtonPlug": "NoneButtonPlug",
"ApplicationID": "914622396630175855",
"UpdateTimeout": 1000,
"Version": "1.6.1",
"UpdateNotifications": true,
"TranslationsPath": "Translations/"
} These were set via the extension settings menu after I reinstalled 1.6.1 yesterday |
Not currently. I did use one before reinstalling yesterday, but I had already reset my config to default before that. My current |
Okay. |
I removed the old version, cleared the old config folder, and installed the debug build. I launched my solution directly and the error came up again. The extension has recreated the config folder in <entry>
<record>2218</record>
<time>2023/10/28 14:24:38.726</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Begin package load [VisualStudioDiscordRPCPackage]</description>
<guid>{5CD3D640-3D33-45EA-8C5B-6DE981FF9900}</guid>
</entry>
<entry>
<record>2219</record>
<time>2023/10/28 14:24:38.757</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Begin package load [Microsoft.VisualStudio.Shell.Connected.ConnectedUser.ConnectedUserPackage]</description>
<guid>{7F679D93-2EB6-47C9-85EB-F6AD16902662}</guid>
</entry>
<entry>
<record>2220</record>
<time>2023/10/28 14:24:38.848</time>
<type>Information</type>
<source>VisualStudio</source>
<description>End package load [NuGetPackage]</description>
<guid>{5FCC8577-4FEB-4D04-AD72-D6C629B083CC}</guid>
</entry>
<entry>
<record>2221</record>
<time>2023/10/28 14:24:38.848</time>
<type>Error</type>
<source>VisualStudio</source>
<description>SetSite failed for package [VisualStudioDiscordRPCPackage]Source: 'VisualStudioDiscordRPC.Dev17' Description: Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
 at VisualStudioDiscordRPC.Shared.Services.SettingsService.MigrateFromLegacySettings()
 at VisualStudioDiscordRPC.Shared.Services.SettingsService..ctor()
 at VisualStudioDiscordRPC.Shared.PackageController.RegisterServices()
 at VisualStudioDiscordRPC.Shared.PackageController.Init()
 at VisualStudioDiscordRPC.Shared.VisualStudioDiscordRPCPackage.<InitializeAsync>d__2.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.Shell.AsyncPackage.<>c__DisplayClass21_0.<<Microsoft-VisualStudio-Shell-Interop-IAsyncLoadablePackageInitialize-Initialize>b__1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e)
 at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck)</description>
<guid>{5CD3D640-3D33-45EA-8C5B-6DE981FF9900}</guid>
<hr>0x80004003 - E_POINTER</hr>
<errorinfo></errorinfo>
</entry> I attempted to open another solution which was working this morning, and it too gives the same error as above. Finally I tried launching VS without any solution, and the extension errors out then too |
Oh. Sorry. This is another error. Try again with this one |
Okay, so I cleared the config and installed that newer one. I directly launched my solution that was erroring. It loaded fine, and my discord activity updated. <entry>
<record>388</record>
<time>2023/10/28 14:43:27.167</time>
<type>Error</type>
<source>VisualStudio</source>
<description>SetSite failed for package [VisualStudioDiscordRPCPackage]Source: '' Description: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
System.ArgumentException: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
 at EnvDTE.DTE.get_ActiveDocument()
 at VisualStudioDiscordRPC.Shared.Variables.FileNameVariable..ctor(VsObserver vsObserver)
 at VisualStudioDiscordRPC.Shared.Services.VariableService..ctor(VsObserver vsObserver)
 at VisualStudioDiscordRPC.Shared.PackageController.RegisterServices()
 at VisualStudioDiscordRPC.Shared.PackageController.Init()
 at VisualStudioDiscordRPC.Shared.VisualStudioDiscordRPCPackage.<InitializeAsync>d__2.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.Shell.AsyncPackage.<>c__DisplayClass21_0.<<Microsoft-VisualStudio-Shell-Interop-IAsyncLoadablePackageInitialize-Initialize>b__1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e)
 at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck)</description>
<guid>{5CD3D640-3D33-45EA-8C5B-6DE981FF9900}</guid>
<hr>0x80070057 - E_INVALIDARG</hr>
<errorinfo></errorinfo>
</entry> I will restart and try again |
Same situation after restart, only VRF solution will cause the error. All my own solutuions work fine. I will update my settings and try a few more times |
I will try to clone and run the same solution. |
I tried changing my settings one-by-one, nothing changed for anything. Still only VRF was causing issues. I tried another test, I deleted my I checked for a fluke, I deleted the new folder, restored the old: Error. I delete it again, loaded it and no error with a clean |
Hm... It's confusing. I can't even guess why this happened and how it affects the extension. |
For me, the project started correctly and without any errors and correctly displayed activity in Discord |
That seems to match what happened for me when I cleared the There's a load of binary files in |
Maybe the project got damaged somehow when you were working in it. It affected |
For completeness sake, I uninstalled the debug build and reinstalled the release version, and confirmed everything is loading again and it is.
Unless you happen to replicate it, I guess this probably is just a weird VS thing rather than a problem with the extension; it works if waiting for a few seconds after launching VS before opening the solution, and only incosistantly with some solutions. If you want to close this at this point, thats cool; thank you for the help 😄 For anyone else that has this problem; |
Okay It's good. I'll leave the Issue open for a few days in case it starts again. |
Unfortunately had this again just now; again not on all solutions (VRF is fine still). I'll continue to just load VS and wait before loading my solutions for now. There was also an update for VS (17.8.0 Preview 6), but that didn't affect it at all. I don't have normal installed to test. The fact the |
Since xml files are not uploadable, it has been converted to .txt here: |
@Reavert Hello! 1.6.5 is broken. I downgrade to 1.6.4 and it just works It must be 9fcc36a
System.ArgumentNullException: Value cannot be null. Parameter name: s at System.Text.UTF8Encoding.GetByteCount(String chars) |
@InternalHigh Hi! |
I think you can reproduce when Details is NoneTextPlug NoneTextPlug returns null in GetData() |
Yes. It actually is. Thanks. |
So the temporary solution is to use the 1.6.4 version at least until 1.6.5 will be fixed? Because before the change through that prompt, everything worked fine. |
@Fabita98 This bug is fixed in 1.6.6 version. You can update the extension and everything will be fine. |
This extension was working fine for a while, but on updating to VS 17.9.1 I started getting this error. VS version: 2022 Community 17.9.1 Activity log: |
@Biglulux You're using the old version. The current version is 1.6.6. This bug has been fixed in the latest version |
Great, just updated and it worked. For some reason it wasn't automatically updating. Thanks. |
I'm having issues with the extension failing to load when launching certain Solutions/Projects directly from the
.sln
or.csproj
files, but not all solutions exhibit this behaviour.If I open VS directly and select a solution to open once VS is already running, I don't encounter this issue, so is a workaround for now.
I cannot pinpoint for certain anything specific about the solutions to cause this issue, yesterday I had this problem on a bunch of different solutions and project, and I ended up reinstalling the extension after first clearing my config folder. After a fresh install of the extension, everything was working again on any solution. I updated my settings and continued working fine.
Upon launching a solution today, the same error occurs. Weirdly, other solutions that this issue would happen before I reinstalled won't cause this issue; hence I find it hard to pinpoint if there is something specific about any solutions to trigger this. But...
Windows targets - related or redhearing?
The solution I had the issue with today contains a WinUI 3 project, targetting
net6.0-windows
. I was looking through issues and in #39 saw they reinstalled the Windows SDK and the problem was gone. I found another solution I had on hand that this error occurs with, and it turns out that has a project targettingnet7.0-windows
; if someone wants to try and reproduce it was ValveResourceFormat, or possible try creating a new project that builds a Windows application. This might be coincidence though, as I was getting this error before with other project targets.Windows 11 Pro, 22621.2428
Visual Studio 17.8.0 Preview 5, Community 2022
VisualStudioDiscordRPC 1.6.1
Error Extract:
The text was updated successfully, but these errors were encountered: