dotnet / dotnet/msbuild

MSBuild disables hard linking when building in Visual Studio

Open
#3,788 18 comments 10 reactions 0 assignees View on GitHub
triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

Consider these two property groups inside of MS.Common.CurrentVersion.targets:

- https://github.com/Microsoft/msbuild/blob/90506c8f6c5e4b82a09bafa6ae62a41e9e7367bb/src/Tasks/Microsoft.Common.CurrentVersion.targets#L4171-L4175
- https://github.com/Microsoft/msbuild/blob/90506c8f6c5e4b82a09bafa6ae62a41e9e7367bb/src/Tasks/Microsoft.Common.CurrentVersion.targets#L4154

These will unconditionally override some of the hard link settings when building inside of Visual Studio. This means that hard links are pretty much useless in VS which is typically the primary build scenario for developers.

Here is data from the [Roslyn repository](https://github.com/dotnet/roslyn) on how much benefit we get from this on the command line at least:

| | Build Time | Binaries Size Explorer | Binaries Size DU |
|-|-|-|-|
| No hard link | 4:00 | 13.9GB | 14.9GB |
| Hard links | 3:28 | 13.8GB | 1.5GB |

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.