Click here to Skip to main content
15,891,033 members
Articles / Programming Languages / C#

How to Create a NuGet Package that Runs your Console App as an MSBuild Task

Rate me:
Please Sign up or sign in to vote.
4.75/5 (3 votes)
9 Jul 2020CPOL4 min read 8.9K   6  
Tutorial using the Build Task NuGet Package Template with GitHub or `dotnet new`
By following this article, you will learn how to create NuGet Packages that utilize MSBuild ExecTask to run your Before or After specific Build Targets. This article (and the templates) only address C#, but can easily be applied to any .NET language because the important bits are language agnostic. The templates are written for .NET Core 3.1, but can easily be adapted to legacy .NET Frameworks or .NET 5. This is the same method used by NuGetDefense.

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer Tech Friends Inc.
United States United States
Software Developer specializing in Build/Test Automation. Adept Linux User and Cross Platform Developer.

Comments and Discussions