microsoft / microsoft/MSBuildSdks
[Feature Request] New MSBuildSdk to simplify creating an MSBuild task package
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 508
- Forks
- 94
- Avg merge
- 6h 40m
- Merged PRs (30d)
- 2
Description
The Problem
The general steps to create a NuGet package that contains MSBuild tasks is outlined here: https://learn.microsoft.com/en-us/visualstudio/msbuild/tutorial-custom-task-code-generation?view=vs-2022#package-the-task-for-distribution
This process requires 8 steps:
- Set
CopyLocalLockFileAssemblies - Mark all PackageReferences with
PrivateAssets="All" - Add the
CopyProjectReferencesToPackagetarget - Set the
BuildOutputTargetFolder - Suppress NU5100 and NU5128
- Mark Microsoft.Build.* assemblies with
ExcludeAssets="runtime" - Set
GenerateDependencyFileand add target to copy to output directory - Add the build/, buildTransitive/, buildMultiTargeting/ folders to the package
and I always forget at least one when creating a new project.
The Proposal
Create a new SDK to centralize these steps, and ideally update the docs to point to the SDK instead. In addition to lowering the barrier to authoring MSBuild tasks, centralizing the process for creating an MSBuild task package will make it easier for authors to follow best practices as they evolve (similar to the DotNet.ReproducibleBuilds packages).
I'm happy to do this work myself, but wanted to get approval before starting. Thoughts?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Microsoft documentation and review the eight listed packaging steps that the proposed SDK should centralize. Compare them with the repository's existing project SDK conventions, then define the SDK scope and update the documentation to reference it when the packaging workflow is covered.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100