dotnet / dotnet/msbuild

Allow providing msbuild logger implicitly (e.g. from env var)

Open
#12,355 0 comments 2 reactions 0 assignees View on GitHub
gathering-feedback triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

### Summary

We would like to add a logger for all builds on our self-hosted build machines. The main idea would be to add the logger dll somewhere on the machine and set an environment variable, so the logger is automatically part of the build without requiring a change in all projects.

### Background and Motivation

We want to provide diagnostic/observability data for all projects running on our build machines. For MSBuild, we want to create a custom logger to export data. However, the current setup requires a change in all MSBuild commands (dotnet build, dotnet test, etc.) to explicitly reference the custom logger.
We would like to avoid this burden and have a way to add the logger automatically.

### Proposed Feature

Add a new environment variable to declare additional loggers `MSBUILD_ADDITIONAL_LOGGERS`. For instance: `MSBUILD_ADDITIONAL_LOGGERS=/full/path/to/CustomLogger.dll`. These loggers would be implicitly added to the loggers from the CLI (`--logger`)

### Alternative Designs

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.