0
votes

I'm trying to follow this tutorial (https://samritchie.net/2012/09/17/nuget-packages-in-vs2012-templates/) to create a Visual Studio VSIX template with Nuget package dependencies that just auto-install when you download the template, but I'm running into issues.

I can't get the packages to auto-install. It's like the VSIX project is completely ignoring the <Wizard> tags in the .vstemplate. I think I must have skipped some essential step. Here's an equivalent tutorial I've been following too: http://docs.nuget.org/create/packages-in-visual-studio-templates

I think this part is the source of my confusion:

packages

There is no such place to insert these tags in my .vsixmanifest file -- it's an editor thing where you have to fill in fields. I'm not sure how this translates.

nuget

The assets tab has a "New" option, but you can't choose a type that looks like .nupkg -- there's no option for that.

Thanks for any help.

1

1 Answers

0
votes

You can right-click the template file in the code file and choose "view code". This way you can see and edit the actual XML File.

Mine looks like this:

<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
  <Metadata>
    <Identity Id="<My VSIXProjectTemplateCode>" Version="1.0" Language="en-US" Publisher="Marcio Sales" />
    <DisplayName>FSharp Report Template</DisplayName>
    <Description xml:space="preserve">F# project template for analyzing data</Description>
  </Metadata>
  <Installation>
    <InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[14.0]" />
  </Installation>
  <Dependencies>
    <Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="[4.5,)" />
  </Dependencies>
  <Assets>
    <Asset Type="fsharp.formatting.2.14.4.nupkg" d:Source="File" Path="Packages\fsharp.formatting.2.14.4.nupkg" d:VsixSubPath="Packages" />
    <Asset Type="Microsoft.VisualStudio.ProjectTemplate" d:Source="File" Path="ProjectTemplates" d:TargetPath="ProjectTemplates\FSReport.zip" />
  </Assets>
</PackageManifest>