RSS

Tag Archives: nuget

Download NuGet Package File

When including NuGet packages in Visual Studio template, you will also include actual .nupkg files in your Visual Studio template.

To get NuGet files:

http://nuget.org/api/v2/package/<package_id>/<version>

To get the latest version:

http://nuget.org/api/v2/package/<package_id>/

Example:

Version 1.7: http://nuget.org/api/v2/package/jquery/1.7
Latest: http://nuget.org/api/v2/package/jquery/
 
Leave a comment

Posted by on July 3, 2012 in General

 

Tags:

NuGet Packages in Visual Studio Project Template as New Project

When include NuGet packages in Visual Studio project template, a modification will need to be done if the template will be used as new project.

Modify .vstemplate file:

<VSTemplate>
        <packages repository="template">
            ...
        </packages>
    </WizardData>
</VSTemplate>

Notice repository attribute in <packages> node.

All the .nupkg files must be placed in the root directory of project template zip file.

 
3 Comments

Posted by on July 3, 2012 in General

 

Tags: , ,

Include NuGet Packages in Visual Studio Project Template

In a single Visual Studio project template, you can include NuGet packages so that when project is added, the NuGet packages are pre-installed.

A small modification is necessary if you are going to use this to create new project.

Edit .vstemplate file to include:

<VSTemplate>
    <WizardExtension>
        <Assembly>NuGet.VisualStudio.Interop, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>
        <FullClassName>NuGet.VisualStudio.TemplateWizard</FullClassName>
    </WizardExtension>
    <WizardData>
        <packages>
            <package id="jQuery" version="1.6.2" />
        </packages>
    </WizardData>
</VSTemplate>

Where <packages> will include all packages pre-installed to the Visual Studio template.

Source: NuGet Docs

 
1 Comment

Posted by on July 3, 2012 in General

 

Tags: , ,

 
%d bloggers like this: