I am creating an update for my open source project RAD Studio Code Generation Toolkit (https://radstudio.codeplex.com ) and I created a new project template along with this update.
In the past I had always used a 'Components' folder to store a Dll that I needed to reference in the template.
I have since uploaded the package to Nuget.org, and I read this article that described deploying Nuget packages with project templates:
https://docs.nuget.org/create/packages-in-visual-studio-templates
I edited the manifest of the project that needs the reference (DataAccessComponent) as shown here:
<WizardExtension><Assembly>NuGet.VisualStudio.Interop, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly><FullClassName>NuGet.VisualStudio.TemplateWizard</FullClassName></WizardExtension><WizardData><packages repository="extension"
repositoryId="NugetInVSTemplates.51608644-4e69-4ecd-84e6-3d558569a1c2"><package id="DataJuggler.Net" version="5.2.1" /></packages></WizardData>When I try to create a new project with the template, the other 3 projects in the template load correctly, but the project DataAccessComponent shows the following error:
I can't find the directory specified anywhere in the .vstemplate files, and obviously other users of the template would not have this directory.
The directory listed in empty:
Does anyone know how to make Nuget look for the packages.config in the project template for the DataAccessComponent project?
Contents of package.config in the DataAccessComponent project:
<?xml version="1.0" encoding="utf-8"?><packages><package id="DataJuggler.Net" version="5.2.1" targetFramework="net461" /></packages>
If I take out the Nuget reference and create the template everything works, but I would really prefer not to make the instructions 'After installation add the Nuget reference for Datajuggler.Net' unless that is the only way.
Thanks for any help, I am sure I am just missing something.
Corby