xsharp.eu • The "XSharp Project System" package did not load correctly in VS 2019 16.4.1
Page 1 of 1

The "XSharp Project System" package did not load correctly in VS 2019 16.4.1

Posted: Wed Dec 18, 2019 9:42 am
by knutdrofus
On one out of two computers where I've instealled XSharp 2.2, I get an error when starting Visual Studio 2019 Professional edition 16.4.1 (Version 4.8.03752):

Error: "The 'XSharp Project System" package did not load correctly.

The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by examining the file "C:Users<myusername>AppDataRoamingMicrosoftVisualStudio16.0_5291f88dActivityLog.xml.

Restarting Visual Studio could help resolve the issue.

Continue to show this error message?" Yes/No.

Restarting visual studio does not help.

I've attached ActivityLog.xml, but the key entry seems to be:

SetSite failed for package [XSharp Project System]Source: 'Microsoft.VisualStudio.Shell.14.0' Description: Due to high risk of deadlock you cannot call GetService from a background thread in an AsyncPackage derived class. You should instead call GetServiceAsync (without calling Result or Wait on the resultant Task object) or switch to the UI thread with the JoinableTaskFactory.SwitchToMainThreadAsync method before calling GetService. System.InvalidOperationException: Due to high risk of deadlock you cannot call GetService from a background thread in an AsyncPackage derived class. You should instead call GetServiceAsync (without calling Result or Wait on the resultant Task object) or switch to the UI thread with the JoinableTaskFactory.SwitchToMainThreadAsync method before calling GetService.at Microsoft.VisualStudio.Shell.AsyncPackage.GetService(Type serviceType)at Microsoft.VisualStudio.Shell.Package.System.IServiceProvider.GetService(Type serviceType)at Microsoft.VisualStudio.Package.LanguageService.SetSite(Object site)at XSharp.Project.XSharpProjectPackage.<InitializeAsync>d__16.MoveNext() in C:XSharpDevPublicVisualStudioProjectPackageXSharpProjectPackage.cs:line 287 --- End of stack trace from previous location where exception was thrown ---at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)at Microsoft.VisualStudio.Shell.AsyncPackage.<>c__DisplayClass16_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.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)at Microsoft.VisualStudio.Threading.JoinableTask.<JoinAsync>d__68.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)at Microsoft.VisualStudio.Services.VsTask.GetResult()

I've attached a screenshot of the error message, info about my visual studio version, and ActivityLog.xml (zipped, because of file type limitations)

The "XSharp Project System" package did not load correctly in VS 2019 16.4.1

Posted: Wed Dec 18, 2019 9:59 am
by robert
Knut,
Thanks for the report.
We'll come with a fix in a few days.

Robert

The "XSharp Project System" package did not load correctly in VS 2019 16.4.1

Posted: Wed Dec 18, 2019 10:01 am
by knutdrofus
Much appreciated. Let me know if you need any more info.

The "XSharp Project System" package did not load correctly in VS 2019 16.4.1

Posted: Wed Dec 18, 2019 10:15 am
by wriedmann
Hi Robert,
I had that also when starting VS 2017, but only the first time. And I had started VS directly on a (C#) solution.
Wolfgang

The "XSharp Project System" package did not load correctly in VS 2019 16.4.1

Posted: Wed Dec 18, 2019 10:31 am
by knutdrofus
I got my error when trying to open a solution with no xsharp projects, but where C#/WPF projects reference vulcan/vo projects.

(our xsharp work is still in a separate feature branch, where we're trying to migrate some old vulcan/vo code to xsharp).

I get this error every time I start VS on my desktop, but never on my laptop, which as far as I can tell, has the exact same xsharp and VS versions installed.

The "XSharp Project System" package did not load correctly in VS 2019 16.4.1

Posted: Thu Dec 19, 2019 1:52 pm
by knutdrofus
I'm not sure if it's helpful, but I just want to add that I got the same error on my other machine after rebooting

The "XSharp Project System" package did not load correctly in VS 2019 16.4.1

Posted: Thu Dec 19, 2019 2:04 pm
by Chris
Thanks guys, there should be a fix for this problem out soon!

The "XSharp Project System" package did not load correctly in VS 2019 16.4.1

Posted: Wed Apr 22, 2020 5:22 am
by Neil
Was there ever a fix for this? I do get this whenever I load VS 2017. I could just choose to not show it I think but don't want to just dismiss it.

The "XSharp Project System" package did not load correctly in VS 2019 16.4.1

Posted: Wed Apr 22, 2020 6:47 am
by knutdrofus
Yes, for me this was fixed by https://www.xsharp.eu/articles/xsharp-bandol-2-2a if I remember correctly.

The "XSharp Project System" package did not load correctly in VS 2019 16.4.1

Posted: Wed Apr 22, 2020 5:40 pm
by Neil
knutdrofus wrote:Yes, for me this was fixed by https://www.xsharp.eu/articles/xsharp-bandol-2-2a if I remember correctly.
Ah. Good to know I'll eventually see it, I guess I can just tell it to stop showing this error for now.

Unfortunately I'm in spare time passion project level (only at the very early stages) to unofficially convert my product over until I get a good enough amount done to convince the higher ups to add it to the roadmap to focus on it and get them to cover the subscription cost.