-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Contributing Tasks
MSBuild tasks are units of executable code used to perform atomic build operations. There are many tasks already in MSBuild but there is always a need for more. We encourage you to contribute useful tasks directory to MSBuild.
Please open an issue to propose a new task. This gives the community a chance to provide feedback and make suggestions. Once there is consensus that the task is needed and the below requirements are met, fork the repository and begin development.
The following requirements are in place for contributed tasks:
- The task must not introduce the need to ship any third-party assemblies.
- The task should work on .NET Framework and .NET Core if possible. It can be confusing to users if a task only works on certain platforms.
- The task must have unit tests in place to prevent regressions.
Review the existing documentation on Task Writing to learn about the fundamentals. You can also looking at existing tasks in the Microsoft.Build.Tasks.Core assembly for a great starting point.
Tasks are generally simple and should not require much effort to develop. If you find a task becoming very complicated, consider breaking it up into smaller tasks which can be run together in a target.
Contributed tasks must have unit tests in place to prove they work and to prevent regressions caused by other code changes. There are a lot of examples in the Microsoft.Build.Tasks.UnitTests project. Please provide a reasonable amount of test coverage so ensure the quality of the product.
You can document the new task in the visualstudio-docs repository. This helps users discover the new functionality. The easiest way is to copy the documentation page for an existing task as a template.
MSBuild ships regularly with Visual Studio. It also is updated in Preview releases. Once your contribution is merged, expect it to be available in the next release.