MSBuild.PublisNuget.Target

A build target that pack and publish the project to a private nuget server.


Keywords
MSBuild, automatic, pack, publish, nuget, package, private, servertarget, targets, dotnet, dotnetframework, push
License
MIT
Install
Install-Package MSBuild.PublisNuget.Target -Version 1.1.7

Documentation

MSBuild.PublishNuget.Target

wakatime Build status MSBuild.PublishNuget.Target NuGet Version MSBuild.PublishNuget.Target NuGet Downloads

Maintainability Test Coverage CodeFactor

Provides a NuGet package that adds functionality to your project to auto pack and publish to a private nuget server the project as a nuget package.

Remarks: This works only with nuget.exe executable and is designed for .NET Framework projects. Not for .NET Core


Installation

Nuget package: https://www.nuget.org/packages/MSBuild.PublishNuget.Target

Install-Package MSBuild.PublishNuget.Target

Instructions

  • Add the package to the project.
  • Make sure you have the nuget.exe executable in your path (i.e. Open a command prompt and type nuget help and check if the version of nuget is displayed).
  • You can download the most recent version of nuget.exeat NuGet downloads page.
  • Open your .csproj and add the following property group to the file:
<PropertyGroup>
    <PackageAPIKey>{{YOUR PRIVATE NUGET FEED KEY}}</PackageAPIKey>
    <PackageServer>{{YOUR PRIVATE NUGET FEED URL}}</PackageServer>
    <PackageDir>{{ DIRECTORY TO GENERATE THE .NUPKG }}</PackageDir>
    <PackageIncludeReferencedProjects>true</PackageIncludeReferencedProjects>
</PropertyGroup>
  • Put your own data (Feed API Key and Feed Url).
  • Set the directory where the package will be generated
  • Set true or false toinclude referenced projects (if ommited will be set to false)
  • Save the .csproj.
  • On Visual Studio, change the current configuration to Release if isn't yet.
  • Build!