dotnet / msbuild

The Microsoft Build Engine (MSBuild) is the build platform for .NET and Visual Studio.
https://docs.microsoft.com/visualstudio/msbuild/msbuild
MIT License
5.21k stars 1.35k forks source link

[Feature Request]: Terminal Logger primary outputs should optionally use absolute paths #9740

Open baronfel opened 7 months ago

baronfel commented 7 months ago

Summary

In https://github.com/dotnet/sdk/issues/38552 @tmds requested that the primary outputs of built projects be able to emit the absolute path instead of relative paths. While we don't think this should be the default behavior, some kind of knob here does make sense for their use case.

Background and Motivation

We chose relative paths for the output (with clickable/right-click-able directory urls) for readability and usability based on customer feedback from the first Terminal Logger releases. However some user workflows benefit from copying the direct file.

Proposed Feature

We should enable this either by emitting the absolute path visually, or by making the generated file://-scheme URIs (for terminals that support clickable links) emit absolute paths. This should be toggled via some option, it should not be the default.

Alternative Designs

No response

baronfel commented 6 months ago

This was also requested by @KalleOlaviNiemitalo in https://github.com/dotnet/msbuild/issues/9800#issuecomment-1974779130.

We'll implement this by checking for the the GenerateFullPaths property, which other tools in the toolchain already set and make use of. TL breaks pretty badly when GenerateFullPaths is false - we need to figure out why that is.

We need to tackle two enablers first