AArnott / CodeGeneration.Roslyn

Assists in performing Roslyn-based code generation during a build.
Microsoft Public License
408 stars 59 forks source link

Remove the Task-provided DotNetCliToolReference #134

Closed amis92 closed 5 years ago

amis92 commented 5 years ago

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).

amis92 commented 5 years ago

An example of confusion is #125.