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

IVsSolutionRestoreService4 should extend IVsSolutionRestoreService3 #11098

Closed
zivkan opened this issue Jul 28, 2021 · 1 comment · Fixed by NuGet/NuGet.Client#4179
Closed
Assignees
Labels
Functionality:SDK The NuGet client packages published to nuget.org Partner:Project-System Priority:2 Issues for the current backlog. Product:VS.Client Type:Bug

Comments

@zivkan
Copy link
Member

zivkan commented Jul 28, 2021

@davkean requested that IVsSolutionRestoreService4 should extend, or re-implement all the methods from IVsSolutionRestoreService3. This avoids needing to MEF import two interfaces.

While IVsSolutionRestoreService3 and IVsSolutionRestoreService2 do not extend the lower numbered interfaces, they are used independently. Anyone using IVsSolutionRestoreService3 will not be using IVsSolutionRestoreService. However, anyone using IVsSolutionRestoreService4 must also use IVsSolutionRestoreService3, it cannot be used independently. Technically, a caller using IVsSolutionRestoreService4 could use IVsSolutionRestoreService, but IVsSolutionRestoreService3 is a superset to support additional properties, so the older interface should probably be deprecated (but is out of scope for this issue).

Using MEF is different to using VS services (GetService<T1, T2>()), where you get the implementation of the service and then cast it to the interface, so VS's COM interfaces that do not (always) extend older interfaces is a different scenario, so should not be taken as precedent.

/cc @nkolev92 @ocallesp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Functionality:SDK The NuGet client packages published to nuget.org Partner:Project-System Priority:2 Issues for the current backlog. Product:VS.Client Type:Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@nkolev92 @zivkan and others