ernstc / SwitchStartupProject2022

Switch Startup Project is a Visual Studio extension that provides a toolbar dropdown box to easily switch between startup projects.
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Extension fails to load in Visual Studio #1

Open xgcssch opened 2 months ago

xgcssch commented 2 months ago

Hello!

I've got the problem, that the Extension does not load. The logfile indicates a missing Microsoft.VisualStudio.Threading Assembly with version 17.10.0.0:

SetSite failed for package [SwitchStartupProjectPackage]Source: 'SwitchStartupProject2022' Description: Could not load file or assembly 'Microsoft.VisualStudio.Threading, Version=17.10.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Das System kann die angegebene Datei nicht finden.
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Threading, Version=17.10.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Das System kann die angegebene Datei nicht finden.
File name: 'Microsoft.VisualStudio.Threading, Version=17.10.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   at SwitchStartupProject.SwitchStartupProjectPackage.InitializeAsync(CancellationToken cancellationToken, IProgress`1 progress)
   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)

=== Pre-bind state information ===
LOG: DisplayName = Microsoft.VisualStudio.Threading, Version=17.10.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
 (Fully-specified)
LOG: Appbase = file:///C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/
LOG: Initial PrivatePath = NULL
Calling assembly : SwitchStartupProject2022, Version=4.2.0.0, Culture=neutral, PublicKeyToken=d1d1e25dd69fbe89.
===
LOG: This bind starts in LoadFrom load context.
WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load().
LOG: Using application configuration file: C:\Users\xgcssch\AppData\Local\Microsoft\VisualStudio\17.0_9dfcbaea\devenv.exe.config
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.VisualStudio.Threading, Version=17.10.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/Microsoft.VisualStudio.Threading.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/Microsoft.VisualStudio.Threading/Microsoft.VisualStudio.Threading.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/PublicAssemblies/Microsoft.VisualStudio.Threading.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/PublicAssemblies/Microsoft.VisualStudio.Threading/Microsoft.VisualStudio.Threading.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/PrivateAssemblies/Microsoft.VisualStudio.Threading.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Major Version
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/PrivateAssemblies/Microsoft.VisualStudio.Threading/Microsoft.VisualStudio.Threading.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TestWindow/Microsoft.VisualStudio.Threading.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TestWindow/Microsoft.VisualStudio.Threading/Microsoft.VisualStudio.Threading.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/CommonExtensions/Platform/Debugger/Microsoft.VisualStudio.Threading.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/CommonExtensions/Platform/Debugger/Microsoft.VisualStudio.Threading/Microsoft.VisualStudio.Threading.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/PrivateAssemblies/DataCollectors/Microsoft.VisualStudio.Threading.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/PrivateAssemblies/DataCollectors/Microsoft.VisualStudio.Threading/Microsoft.VisualStudio.Threading.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/PrivateAssemblies/DataCollectors/x64/Microsoft.VisualStudio.Threading.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/PrivateAssemblies/DataCollectors/x64/Microsoft.VisualStudio.Threading/Microsoft.VisualStudio.Threading.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/Microsoft.VisualStudio.Threading.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/Microsoft.VisualStudio.Threading/Microsoft.VisualStudio.Threading.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/PublicAssemblies/Microsoft.VisualStudio.Threading.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/PublicAssemblies/Microsoft.VisualStudio.Threading/Microsoft.VisualStudio.Threading.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/PrivateAssemblies/Microsoft.VisualStudio.Threading.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/PrivateAssemblies/Microsoft.VisualStudio.Threading/Microsoft.VisualStudio.Threading.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TestWindow/Microsoft.VisualStudio.Threading.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TestWindow/Microsoft.VisualStudio.Threading/Microsoft.VisualStudio.Threading.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/CommonExtensions/Platform/Debugger/Microsoft.VisualStudio.Threading.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/CommonExtensions/Platform/Debugger/Microsoft.VisualStudio.Threading/Microsoft.VisualStudio.Threading.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/PrivateAssemblies/DataCollectors/Microsoft.VisualStudio.Threading.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/PrivateAssemblies/DataCollectors/Microsoft.VisualStudio.Threading/Microsoft.VisualStudio.Threading.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/PrivateAssemblies/DataCollectors/x64/Microsoft.VisualStudio.Threading.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/PrivateAssemblies/DataCollectors/x64/Microsoft.VisualStudio.Threading/Microsoft.VisualStudio.Threading.EXE.
LOG: Attempting download of new URL file:///c:/users/xgcssch/appdata/local/microsoft/visualstudio/17.0_9dfcbaea/extensions/h4ooslpn.tc2/Microsoft.VisualStudio.Threading.DLL.
LOG: Attempting download of new URL file:///c:/users/xgcssch/appdata/local/microsoft/visualstudio/17.0_9dfcbaea/extensions/h4ooslpn.tc2/Microsoft.VisualStudio.Threading/Microsoft.VisualStudio.Threading.DLL.
LOG: Attempting download of new URL file:///c:/users/xgcssch/appdata/local/microsoft/visualstudio/17.0_9dfcbaea/extensions/h4ooslpn.tc2/Microsoft.VisualStudio.Threading.EXE.
LOG: Attempting download of new URL file:///c:/users/xgcssch/appdata/local/microsoft/visualstudio/17.0_9dfcbaea/extensions/h4ooslpn.tc2/Microsoft.VisualStudio.Threading/Microsoft.VisualStudio.Threading.EXE.

As a workaround i tried to download a matching version from NuGet. Tried all 17.10.* versions, but always got an error complaining about a missing function:

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

Do you have any idea, how to solve this problem?

Best regards Sönke Schau

Installed VS Version Info:

Microsoft Visual Studio Enterprise 2022
Version 17.9.6
VisualStudio.17.Release/17.9.6+34728.123
Microsoft .NET Framework
Version 4.8.09037

Installed Version: Enterprise

Architecture Diagrams and Analysis Tools   00476-80000-00000-AA745
Microsoft Architecture Diagrams and Analysis Tools

Visual C++ 2022   00476-80000-00000-AA745
Microsoft Visual C++ 2022

ADL Tools Service Provider   1.0
This package contains services used by Data Lake tools

ASA Service Provider   1.0

ASP.NET and Web Tools   17.9.199.22661
ASP.NET and Web Tools

Azure App Service Tools v3.0.0   17.9.199.22661
Azure App Service Tools v3.0.0

Azure Data Lake Tools for Visual Studio   2.6.5000.0
Microsoft Azure Data Lake Tools for Visual Studio

Azure Functions and Web Jobs Tools   17.9.199.22661
Azure Functions and Web Jobs Tools

Azure Stream Analytics Tools for Visual Studio   2.6.5000.0
Microsoft Azure Stream Analytics Tools for Visual Studio

C# Tools   4.9.0-3.24121.1+a98c90d56455379836dd5c845b35fa932b00cfa3
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Cookiecutter   17.0.24002.3
Provides tools for finding, instantiating and customizing templates in cookiecutter format.

Dotfuscator Community Edition   6.5.3+7f0b0a9d18
PreEmptive Protection - Dotfuscator CE

Extensibility Message Bus   1.4.39 (main@e8108eb)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.

GitHub Copilot   1.147.0.0 (v1.147.0.0@218a5ecac)
GitHub Copilot is an AI pair programmer that helps you write code faster and with less work.

GitHub Copilot Agent   1.147.0

Microsoft Azure Hive Query Language Service   2.6.5000.0
Language service for Hive query

Microsoft Azure Stream Analytics Language Service   2.6.5000.0
Language service for Azure Stream Analytics

Microsoft Azure Tools for Visual Studio   2.9
Support for Azure Cloud Services projects

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Mono Debugging for Visual Studio   17.9.0 (b3bca6f)
Support for debugging Mono processes with Visual Studio.

Node.js Tools   1.5.50908.1 Commit Hash:c294679b821c4b8f7f9c6db3827b7655db80fc28
Adds support for developing and debugging Node.js apps in Visual Studio

NuGet Package Manager   6.9.2
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

Office Developer Tools for Visual Studio   17.6.34328.02
Microsoft Office Developer Tools for Visual Studio

Python - Django support   17.0.24002.3
Provides templates and integration for the Django web framework.

Python - Profiling support   17.0.24002.3
Profiling support for Python projects.

Python - VC Project Support   17.0.23055.1
Provides support for launching C++ projects with Python debugging enabled.

Python with Pylance   17.0.24002.3
Provides IntelliSense, projects, templates, debugging, interactive windows, and other support for Python developers.

Razor (ASP.NET Core)   17.9.2.2412004+684740676513b3b208d5bd5b7f8786dab8d287b7
Provides languages services for ASP.NET Core Razor.

SQL Server Data Tools   17.9.56.1
Microsoft SQL Server Data Tools

Switch Startup Project   4.2
Provides a toolbar dropdown box  to switch between startup projects.

Test Adapter for Boost.Test   1.0
Enables Visual Studio's testing tools with unit tests written for Boost.Test.  The use terms and Third Party Notices are available in the extension installation directory.

Test Adapter for Google Test   1.0
Enables Visual Studio's testing tools with unit tests written for Google Test.  The use terms and Third Party Notices are available in the extension installation directory.

ToolWindowHostedEditor   1.0
Hosting json editor into a tool window

TypeScript Tools   17.0.30103.2001
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools   4.9.0-3.24121.1+a98c90d56455379836dd5c845b35fa932b00cfa3
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools   17.9.0-beta.23614.3+a521e1cd420beb56c15faf6836184fadd2b7937a
Microsoft Visual F# Tools

Visual Studio IntelliCode   2.2
AI-assisted development for Visual Studio.

VisualStudio.DeviceLog   1.0
Information about my package

VisualStudio.Mac   1.0
Mac Extension for Visual Studio

VSPackage Extension   1.0
VSPackage Visual Studio Extension Detailed Info

Web Compiler   1.14.11
Compiler for LESS, Sass and CoffeeScript files

Workflow Manager Tools 1.0   1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.

Xamarin   17.9.0.140 (d17-9@7ca5d58)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer   17.9.3.0 (remotes/origin/d17-9@f174974f91)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin Templates   17.9.0 (38e87ba)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.

Xamarin.Android SDK   13.2.2.0 (d17-5/45b0e14)
Xamarin.Android Reference Assemblies and MSBuild support.
    Mono: d9a6e87
    Java.Interop: xamarin/java.interop/d17-5@149d70fe
    SQLite: xamarin/sqlite/3.40.1@68c69d8
    Xamarin.Android Tools: xamarin/xamarin-android-tools/d17-5@ca1552d

Xamarin.iOS and Xamarin.Mac SDK   16.4.0.23 (9defd91b3)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
ernstc commented 1 month ago

Hi @xgcssch, have you tried to upgrade your VS2022 to Version 17.10 or higher?