Skip to content

MSBuild logger that emits GitHub Actions annotations for errors and warnings

License

Notifications You must be signed in to change notification settings

reupen/msbuild-github-logger

Repository files navigation

MSBuild logger for GitHub Actions

This is a custom MSBuild logger that emits GitHub Actions annotations for warnings and errors.

These appear in the PR diff:

PR diff example

And in the run summary:

Run summary

Requirements

The logger has been tested with Visual Studio 2022 17.1 and 2019 16.11. Similar versions should be compatible.

Usage

Reupen.MSBuild.GitHubLogger.dll needs to be available to the GitHub Actions workflow. This can be achieved either by downloading it during the workflow run, or commiting it to your repo.

Then, /logger:path\to\Reupen.MSBuild.GitHubLogger.dll should be passed to the logger.

For a complete example, see https://github.com/reupen/columns_ui/tree/master/.github/workflows/build.yml.

Notes

The logger currently logs all warnings and errors. This may not be suitable if your project has a large number of warnings.

Additionally, GitHub Actions has limits on annotations including a limit of 10 warning and 10 error annotations per step.

About

MSBuild logger that emits GitHub Actions annotations for errors and warnings

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages