I'm trying to install a nuget package into a project that I am generating with a VSPackage. So far, I am able to create a solution from a project template:
Solution4 soln = (Solution4)ApplicationObject.Solution;
string prjPath = "C:\\MyProject";
string templatePath = soln.GetProjectTemplate(@"SomeProject\MyTemplate.vstemplate", "CSharp");
soln.AddFromTemplate(templatePath, prjPath, "New CSharp Project", false);
But now I need to be able to install a nuget package into that project as well. The package is located online, for example, https://somewhere.mydomain.com/nuget/feed
, and has the ID PackageX
.