AArnott / CodeGeneration.Roslyn

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

.NET Core 3 support dotnet-codegen #174

Closed pethin closed 4 years ago

pethin commented 4 years ago

Create runtimeconfig.template.json containing rollForward for .NET Core 3 support

This is what was done for FAKE: https://github.com/fsharp/FAKE/issues/2325 Fixes #169

amis92 commented 4 years ago

For future reference the actual switch documentation that I could find is at https://docs.microsoft.com/en-us/dotnet/core/whats-new/dotnet-core-2-1#roll-forward (introduction doc)

amis92 commented 4 years ago

Reading futher, this is the design document about runtime bindings: https://github.com/dotnet/designs/blob/master/accepted/runtime-binding.md#rollforward

This article specifies that the rollForwardOnNoCandidateFx is deprecated starting with 3.0, and RollForward is the recommended one.

I'd like to go with the RollForward in that case - and it can be specified within csproj when using SDK 3.0.

pethin commented 4 years ago

I changed rollForwardOnNoCandidateFx to rollForward in runtimeconfig.template.json since that's what recommended in .NET Core 3. The csproj property doesn't work unless you build using .NET Core 3.

amis92 commented 4 years ago

I've used RollForward property with SDK v3.1 - see #178