Существует установщик IVsPackageInstaller, который можно использовать для установки пакета NuGet из Visual Studio.
Установите пакет NuGet.VisualStudio NuGet, а затем используйте MEF для получения доступа к нему.
//Using the Import attribute
[Import(typeof(IVsPackageInstaller2))]
public IVsPackageInstaller2 packageInstaller;
packageInstaller.InstallLatestPackage(null, currentProject,
"Newtonsoft.Json", false, false);
//Using the IComponentModel service
var componentModel = (IComponentModel)GetService(typeof(SComponentModel));
IVsPackageInstallerServices installerServices =
componentModel.GetService<IVsPackageInstallerServices>();
var installedPackages = installerServices.GetInstalledPackages();
Вышесказанное было извлечено из документации на сайте NuGet:
https://docs.microsoft.com/en-us/nuget/visual-studio-extensibility/nuget-api-in-visual-studio