Using NuGet inVS Project Templates

Topics: General
Nov 13, 2012 at 4:05 PM

Ok i have read this:

And i dont think it fits my context, i already have several project templates in a shared folder as zip templates (no visx, just zip).

I want to put in the templates the dependencies (nuget packages) spec but no the nupkg files, what i want is when a developer do new project -> my template he gets the project with the packages.config file and installs the packages from our local repository automatically, alternative could be on the build he gets the missing packages with the "packages restore on build function", can this be done, what i have to do in the .vstemplate file ??


Nov 13, 2012 at 6:48 PM

you can include in your template the packages.config file, together with the nuget.targets and the nuget.exe command. These are required for package restore to work, although it feel weirds to include an .exe in the project.

Nov 14, 2012 at 1:46 PM

Ok, thanks ill see what i can do.

Have tested the including the nupkg in the zip solution and it works ok, ill see if i can tweak something.