Template Wizards, IWizard Interface - GetService?
Okay,
I'm a little frustrated. Migrated to many versions of the TemplateWizardInterface which broke my stuff. Now, I wanted to be on the latest versions of everything but that broke VS2019, and I need to maintain both 2019 and evolve to 2022, but that is at a later date.
Currently I've completely reverted to following NuGet packages:
- EnvDTE (8.0.1)
- EnvDTE80 (8.0.1)
- VSSDK.TemplateWizardInterface (12.0.4)
- Nuget.VisualStudio (5.11.3)
This now works just fine as it always has.
However, in the IWizard interface there are a series of methods. The primary one being RunStarted() which passes in an "automationObject". This is just a type Object which must be cast to something.
Now, as you can see I am also referencing the Nuget.VisualStudio package, which has certain interfaces.
Most references I find on the Internet reference calling:
IVsPackageInstaller installer = GetService<IVsPackageInstaller>();
However, there is no method "GetService". That's on an IServiceProvider, or the IComponentModel for the modern libraries, which I do not have access to.
So, from the IWizard interface, how do I access a IServiceProvider or other such means in order to get a reference to the Nuget.VisualStudio objects?
Thanks
Jaeden "Sifo Dyas" al'Raec Ruiner