Yes. Use the method described in Invoking NuGet Services from inside Visual Studio.
In particular, look at the methods on the IVsPackageInstaller service.
Question
I'm creating a scaffolding tool and want to install a nuget package in a certain project from an EnvDTE extension. Is this possible?
Solution
Yes. Use the method described in Invoking NuGet Services from inside Visual Studio.
In particular, look at the methods on the IVsPackageInstaller service.