A warning appears when opening Visual Studio with the my last solution. The warning mentions that the package didn't load correctly but the extensions works as expected.
Steps to recreate
Opens Visual Studio
Opens a project
Waits a couple of second and you should get the following warning :
Here's the content of the log file as mention in the previous screenshot :
658InformationVisualStudioBegin package load [AutoSortPackage]{01A71080-33CD-4769-883B-07242C7C6C3E}659ErrorVisualStudioSetSite failed for package [AutoSortPackage]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 System.ComponentModel.Design.MenuCommandService.GetService(Type serviceType)
at System.ComponentModel.Design.MenuCommandService.EnsureVerbs()
at System.ComponentModel.Design.MenuCommandService.FindCommand(Guid guid, Int32 id)
at System.ComponentModel.Design.MenuCommandService.FindCommand(CommandID commandID)
at System.ComponentModel.Design.MenuCommandService.AddCommand(MenuCommand command)
at AutoSortVcxprojFilters.SortAllCommand..ctor(Package package) in C:\projects\autosortvcxprojfilters\AutoSortVcxprojFilters\SortAllCommand.cs:line 52
at AutoSortVcxprojFilters.AutoSortPackage.<InitializeAsync>d__4.MoveNext() in C:\projects\autosortvcxprojfilters\AutoSortVcxprojFilters\AutoSortPackage.cs:line 87
--- 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 Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e)
at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck)
at Microsoft.VisualStudio.Services.VsTask.GetResult(){01A71080-33CD-4769-883B-07242C7C6C3E}80131509
660ErrorVisualStudioEnd package load [AutoSortPackage]{01A71080-33CD-4769-883B-07242C7C6C3E}80131509
Current behavior
A warning is shown each time I open my first project in Visual Studio.
Expected behavior
I would expect the extension to work without any warning in Visual Studio.
Installed product versions
Description
A warning appears when opening Visual Studio with the my last solution. The warning mentions that the package didn't load correctly but the extensions works as expected.
Steps to recreate
Here's the content of the log file as mention in the previous screenshot :
80131509
80131509
Current behavior
A warning is shown each time I open my first project in Visual Studio.
Expected behavior
I would expect the extension to work without any warning in Visual Studio.