MSBuild.PublishNuget.Target

๐ŸŽฏ 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.


Project maintained by guibranco Hosted on GitHub Pages — Theme by mattgraham

MSBuild.PublishNuget.Target

Wakatime Build Status NuGet Version NuGet Downloads CodeFactor

๐ŸŽฏโš™๏ธ MSBuild.PublishNuget.Target is a NuGet package that automates the process of packing and publishing your .NET Framework project as a NuGet package to a private NuGet server.

[!Important]

  • This package is designed for .NET Framework projects and does not support .NET Core or newer frameworks.
  • It requires the nuget.exe executable to be available in your systemโ€™s PATH.

๐Ÿš€ Features


๐Ÿ“ฆ Installation

Install the package via NuGet Package Manager Console:

Install-Package MSBuild.PublishNuget.Target

Or visit the NuGet package page for more information.


๐Ÿ› ๏ธ Configuration Instructions

Prerequisites

  1. Ensure the nuget.exe executable is installed and available in your systemโ€™s PATH.
    • Open a command prompt and type nuget help. If the version information is displayed, youโ€™re ready to go.
    • If nuget.exe is not installed, download the latest version from the NuGet Downloads Page.

Setup

  1. Add the NuGet package to your project.

  2. Open your .csproj file and add the following <PropertyGroup> configuration:

    <PropertyGroup>
        <PackageAPIKey></PackageAPIKey>
        <PackageServer></PackageServer>
        <PackageDir></PackageDir>
        <PackageIncludeReferencedProjects>true</PackageIncludeReferencedProjects>
    </PropertyGroup>
    

    Replace the placeholders with the following:

    • PackageAPIKey: Your private NuGet feed API key.
    • PackageServer: The URL of your private NuGet feed.
    • PackageDir: Directory where the .nupkg file will be generated.
    • PackageIncludeReferencedProjects: Set to true to include referenced projects, or false to exclude them (defaults to false if omitted).
  3. Save the .csproj file.

  4. In Visual Studio, set the current build configuration to Release.

  5. Build the project.


๐ŸŽ‰ Example Workflow

  1. Install the NuGet package and configure your .csproj file as described.
  2. Build your project in Release mode.
  3. The generated .nupkg file will be published to your private NuGet feed.

๐Ÿ”— Resources


๐Ÿงฉ Contributing

Contributions are welcome!
Feel free to submit issues, feature requests, or pull requests to improve this project.


๐Ÿ“„ License

This project is licensed under the MIT License.