Skip to content
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

Missing Microsoft.VisualStudio.Threading dependency #73

Open
pklima opened this issue Oct 11, 2019 · 1 comment
Open

Missing Microsoft.VisualStudio.Threading dependency #73

pklima opened this issue Oct 11, 2019 · 1 comment

Comments

@pklima
Copy link

pklima commented Oct 11, 2019

IncludeToolbox 2.4.1 is failing to load for me in Visual Studio 2017 15.6.7.

After starting Visual Studio and opening a .cpp file the following error appears:

---------------------------
Microsoft Visual Studio
---------------------------
The 'IncludeToolboxPackage' 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\Deadfast\AppData\Roaming\Microsoft\VisualStudio\15.0_3e853fc2\ActivityLog.xml'.

Restarting Visual Studio could help resolve this issue.

Continue to show this error message?
---------------------------
Yes   No   
---------------------------

The aforementioned log file contains the following error:

SetSite failed for package [IncludeToolboxPackage]Source: 'IncludeToolbox' Description: Could not load file or assembly 'Microsoft.VisualStudio.Threading, Version=15.8.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Threading, Version=15.8.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.VisualStudio.Threading, Version=15.8.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'at IncludeToolbox.IncludeToolboxPackage.InitializeAsync(CancellationToken cancellationToken, IProgress`1 progress)at Microsoft.VisualStudio.Shell.AsyncPackage.<>c__DisplayClass16_0.<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)at Microsoft.VisualStudio.Services.VsTask.GetResult() WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

To summarise the spam, it's trying and failing to load Microsoft.VisualStudio.Threading of version 15.8.0.0.

Looking at the extension files it doesn't actually ship any dependencies, perhaps it should?

@pklima
Copy link
Author

pklima commented Oct 12, 2019

I locally fixed this by including said dependency alongside the package but that just moved the problem elsewhere:

SetSite failed for package [IncludeToolboxPackage]Source: 'IncludeToolbox' Description: Method not found: 'Microsoft.VisualStudio.Threading.JoinableTaskFactory Microsoft.VisualStudio.Shell.ThreadHelper.get_JoinableTaskFactory()'. System.MissingMethodException: Method not found: 'Microsoft.VisualStudio.Threading.JoinableTaskFactory Microsoft.VisualStudio.Shell.ThreadHelper.get_JoinableTaskFactory()'. at IncludeToolbox.IncludeToolboxPackage.d__6.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) at IncludeToolbox.IncludeToolboxPackage.InitializeAsync(CancellationToken cancellationToken, IProgress`1 progress) at Microsoft.VisualStudio.Shell.AsyncPackage.<>c__DisplayClass16_0.<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) at Microsoft.VisualStudio.Services.VsTask.GetResult()
--

This seems to be a bug in the VS 2019 SDK: using JoinableTaskFactory.SwitchToMainThreadAsync() unintentionally introduces a Microsoft.VisualStudio.Threading 6.0.0.0 dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant