In VS2022, the interfaces `IVsSolutionLoadManager` and `IVsSolutionLoadManagerSupport` have been removed. What is the recommended way now to handle solution load?
See original GitHub issueI have a custom project solution which does some cleanup tasks before the solutions are opened. With Visual Studio 2022, in the list of removed APIs, https://docs.microsoft.com/en-us/visualstudio/extensibility/migration/removed-api-list?view=vs-2022#asynchronous-solution-load-and-lightweight-solution-load one of the items are the interfaces IVsSolutionLoadManager
and IVsSolutionLoadManagerSupport
. After this removal, what is the recommended way to handle solution load.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Visual Studio 2022 SDK removed APIs
Support for opening a solution from source safe is being removed, as such the following methods, events, and, constants are being removed.
Read more >Visual Studio cannot load a small set of projects in a large ...
As of VS 15.2, I cannot find any solution load manager extension that ... IVsSolutionLoadManager interface has apparently been deprecated.
Read more >Visual Studio 2022 not loading Android project
For now, the easiest fix is to delete your hidden .vs folder for the solution. You then should be able to open the...
Read more >Still forced to delete ".vs" folder to fix build errors or ...
When I deleted the ".vs" folder and reopened the solution, everything was fixed and fully functional again. Please note that I strongly suspect ......
Read more >1. Solutions and Projects - Mastering Visual Studio .NET ...
To build anything with Visual Studio .NET, you need to use a solution, and that solution must contain at least one project. Solutions...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There are APIs like IVsSolutionEvents.OnAfterOpenSolution, IVsSolutionEvents.OnBeforeCloseSolution, IVsSolutionEvents.OnAfterCloseSolution, and KnownUIContexts.SolutionOpeningContext. Note that
IVsSolution.GetSolutionInfo
will return nulls (no solution loaded) whenSolutionOpeningContext
’s callback triggers. This one caught me out and I didn’t find a good solution except to re-checkIVsSolution.GetSolutionInfo
in every place that needs to know the solution path until the first time it’s not null. In practice, it was always not null the very next callback I received, but that might beIVsSolutionEvents.OnAfterLoadProject
orIVsSolutionEvents.OnAfterLoadSolution
, depending on whether or not the solution has any projects. When a solution does contain one or more projects, there wasn’t any event I could find that would allow me to get the solution directory before per-project events started coming in.It’s not always easy, and sometimes can take significant time, but if you go the dotnet api browser, and select VS SDK 2022, or search scoped to the VS SDK, then you can start searching for keywords like solution and slowly hunt through the results until you find something worth testing. In fact, doing this in order to get the links for this comment, I discovered that there exists a
SolutionEvents
class, which claims to be a “Managed-friendly wrapper for IVsSolutionEvents”.@zivkan Thank you, your comments helped. It took me sometime to figure this out, and put everything in order.
I will close this issue.