I have exported a template project using the export tool in VS2015. I have created a nuget package which this project rely on. In the vstemplate file I have added:
<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="ViSoftVSIXPackage.Visoft.87c53ff4-9d1f-xxxxxxxxxxxxxx">
<package id="ViSoftCore" version="1.0.0" />
</packages>
</WizardData>
The repositoryId is the Id of the VSIX project. In the VSIX project I have added the assets:
<Assets>
<Asset Type="ViSoftCore.1.0.0.nupkg" d:Source="File" Path="Packages\ViSoftCore.1.0.0.nupkg" d:VsixSubPath="Packages" />
<Asset Type="Microsoft.VisualStudio.ProjectTemplate" d:Source="File" Path="ProjectTemplates" d:TargetPath="ProjectTemplates\HMIViSoft.zip" />
</Assets>
Now, when i install the vsix, create a new project I get the following: NuGet Package restore failed for project HMI.ViSoft4: Unable to find version '1.0.0' of package 'ViSoftCore. When I go to Nuget Package Manager it says the package is installed but not able to find source.
I have tried this in many ways and I can't get this to work automaticly. If i manually create a package source in nuget package manager to c:\packagelocation everything is all good.
What am i missing here? Is this not supported? Do I write code in the vsix to create a package source in the nuget package manager?