I'm creating a Visual Studio Project Template and bundling it inside of a VS Extension. I need Projects created from the Template to reference ~20 NuGet packages.
Is it possible to have the references resolved from nuget.org rather than having to include all of the references inside the VSIX?
The NuGet documentation on Visual Studio Templates provides instructions on how to add packages inside the VSIX, but it requires the file be stored locally on disk and the .nupkg
is bundles inside the vsix:
Add your nupkg files as custom extension content in your source.extension.vsixmanifest file. If you're using the 2.0 schema it should look like this:
<Asset Type="Moq.4.0.10827.nupkg" d:Source="File" Path="Packages\Moq.4.0.10827.nupkg" d:VsixSubPath="Packages" />
Question already asked
I know a similar question was asked (Creating a Visual Studio Project Template that already includes a Nuget Package Reference?) and answered (not possible), but this was asked in 2011.
5 years later, is it still not possible?
RunFinished
-Method you could manually install/upgrade your packages. That isnt really hackish, since there is no other solution. – ValidateRunFinished
) then that is really all I am going for. But I don't know of a way to programatically do a restore of nuget packages.... – Hagood