The problem is when a consumer doesn't add the line to his own .csproj.
This will never work correctly since the .NET Core SDK tool resolution won't correctly restore the tool on first pass. After the tool is restored into local cache, this will start to work. It introduces a subtle bug that causes confusion (there is a different build result depending on nuget tool cache contents).
https://github.com/AArnott/CodeGeneration.Roslyn/blob/2e4498c271b20b884c6273ec38ce530d3002c1b6/src/CodeGeneration.Roslyn.Tasks/build/CodeGeneration.Roslyn.BuildTime.props#L6
The problem is when a consumer doesn't add the line to his own
.csproj
.This will never work correctly since the .NET Core SDK tool resolution won't correctly restore the tool on first pass. After the tool is restored into local cache, this will start to work. It introduces a subtle bug that causes confusion (there is a different build result depending on nuget tool cache contents).