microsoft / VSExtensibility

A repo for upcoming changes to extensibility in Visual Studio, the new extensibility model, and language server protocol.
MIT License
351 stars 42 forks source link

DTE2 members to implement in new Extensibility Model #367

Open LeeMSilver opened 2 months ago

LeeMSilver commented 2 months ago

Per issue #352 my extension may not be able to use await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); and therefore not be convertible to the new Extensibility Model (EM).

I only use that method for accessing some DTE2 members and its use is the reason that my extension is in-proc. If the EM could implement the following DTE2 members my extension conversion can continue (and be out-of-proc.)

How they are implemented (e.g. in their own class, as extension methods, etc.) is of no concern, nor is it a concern if any of them have to use await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); as long as they return on the calling thread (or any thread, so long as execution can continue and possibly invoke DTE.ExecuteCommand() multiple times.