Is there any instructions to add nugets and references in project template?
The best way is to add nuget without version. Nugets will be added not from nuget.org but from internal corporate resource.
What I mean. In the SolutionExplorer picture red boxes are references from nugets and blue boxes are references were included using Add reference
.
After I used Export template
I don't see any references in zip folder.
And when I create new project with my template I see errors on nuget references and no errors on references from PC(but their absolute pathes are not in the project so I can't distribute template to other developers).
Specific instructions for creating a project template with nuget packagaes are documented at nuget.org. Unfortunately, it is not possible to add a nuget package to a project template without a version number:
vstemplate (this is required to invoke package download at template inflation):
package list:
There are additional options documented on the nuget site linked above, such as creating a
VSIX
template.Regarding nuggets, use package manager console and add (for eg:
Install-Package Newtonsoft.Json
) and then click enter.For the references, according to the image, it may refer to the GAC and not the local bin folder of the solution. The best way is always to maintain the references in the Bin/Reference folder and then refer from it.
In this case, you need to import the dll again.
Hope it helps!