Package: NuGet Publisher task version 0.*
TFS 2017 | TFS 2015 | TFS 2013
Use this task to publish your NuGet package to a server and update your feed.
Demands
None
Arguments
Argument | Description |
---|---|
Path/Pattern to nupkg |
Specify the packages you want to publish.
|
Feed type |
Advanced options
Argument | Description |
---|---|
NuGet Arguments | (Optional) Additional arguments passed to nuget push. |
Path to NuGet.exe | (Optional) Path to your own instance of NuGet.exe. If you specify this argument, you must have your own strategy to handle authentication. |
Task control options
Examples
You want to package and publish some projects in a C# class library to your Azure Artifacts feed.
`-- Message
|-- Message.sln
`-- ShortGreeting
|-- ShortGreeting.csproj
|-- Class1.cs
`-- Properties
|-- AssemblyInfo.cs
`-- LongGreeting
|-- LongGreeting.csproj
|-- Class1.cs
`-- Properties
|-- AssemblyInfo.cs
Prepare
AssemblyInfo.cs
Make sure your AssemblyInfo.cs files contain the information you want shown in your packages. For example, AssemblyCompanyAttribute
will be shown as the author, and AssemblyDescriptionAttribute
will be shown as the description.
Variables tab
Name | Value |
---|---|
$(BuildConfiguration) |
release |
$(BuildPlatform) |
any cpu |
Options
Setting | Value |
---|---|
Build number format | $(BuildDefinitionName)_$(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) |
Publish to Azure Artifacts
Make sure you've prepared the build as described above.
Create the feed
See Create a feed.
Build tasks
|
Build your solution.
|
|
Package your projects.
|
|
Publish your packages to Azure Artifacts.
|
Publish to NuGet.org
Make sure you've prepared the build as described above.
Register with NuGet.org
If you haven't already, register with NuGet.org.
Build tasks
|
Build your solution.
|
|
Package your projects.
|
|
Publish your packages to NuGet.org.
|