Skip to content

guibranco/MSBuild.PublishNuget.Target

Repository files navigation

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!

About

🎯 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.

Topics

Resources

License

Stars

Watchers

Forks