VsixCommunity / Community.VisualStudio.Toolkit

Making it easier to write Visual Studio extensions
Other
256 stars 44 forks source link

VS Build Scope #412

Open Tim-Maes opened 1 year ago

Tim-Maes commented 1 year ago

I am migrating an VS2019 extension to VS2022. I'm trying to get projects withing build scope as I would do with DTE image How can this be achieved with the toolkit?

reduckted commented 1 year ago

GetProjectsInBuildScope appears to be an extension method: https://github.com/Tim-Maes/T4Executer/blob/14021a7c6462f688c433e5f97905d8536d766e3a/TTExecuter/Extensions/DTEExtensions.cs#L14-L22

It should be easy enough to convert to the toolkit.

For the solution scope:

VS.Solutions.GetAllProjectsAsync();

For the project scope:

VS.Solutions.GetActiveProjectAsync();