0

How can I ship an project template that includes dependencies on 3rd party nugget packages and ensure the end user will have the option to accept any package license before installing it?

I'm creating a visual studio project template which will include some nugget packages. I figure I can do it two ways:

  1. Add required references to the csproj file and include packages.config in the template: After project is created and before build, it will 'download the missing packages'.
  2. Follow instructions on this document (Packages in Visual Studio templates) and embed packages within the extension so they get installed when the project is created.

Either way, the end user will end up with one or more packages installed on their project without ever having to agree with the package licenses (VS is performing kind of a silent install).

Ebrito
  • 21
  • 5
  • Did you want create a template with 3rd party nuget packages and have package license before restore packages? As fa as I know, NuGet will restore the packages automatically after create a new project using custom template without any package license. This is designed by nuget, so could not achieve it using custom template. – Leo Liu Mar 30 '17 at 09:49
  • That is exactly what I'm trying to accomplish. It bugs me since it has potential for (serious) legal issues. Without the packages the templates won't have that much value considering that starting a new project becomes a pain. With the packages, I'm basically "hiding" the licenses from end users", who can latter argue they didn't even know they were using those package. It is a trick situation for template developers. I guess my option is to make sure I only add packages distributed under MIT license then. – Ebrito Mar 31 '17 at 14:36

0 Answers0