andrewlock / StronglyTypedId

A Rosyln-powered generator for strongly-typed IDs
MIT License
1.52k stars 79 forks source link

Support .NET Core 3.1 #10

Closed vebbo2 closed 4 years ago

vebbo2 commented 4 years ago

Hi @andrewlock , did you have a chance to take a look at this?

andrewlock commented 4 years ago

Hi @vebbo2, sorry for the delay! Thanks for this - just wondering, was there any reason this wasn't working previously? As far as I'm aware, this should be working on .NET Core 3.1 shouldn't it?

vebbo2 commented 4 years ago

@andrewlock Quoting you: https://github.com/andrewlock/StronglyTypedId/issues/5#issuecomment-524254501 :) That's why CodeGeneration.Roslyn was upgraded and dotnet-codegen tool replaced with another package

andrewlock commented 4 years ago

Haha, of course 🤦‍♂️ thanks for jogging my memory! 🙂

andrewlock commented 4 years ago

Thanks @vebbo2, really appreciate you putting the effort in!😀

andrewlock commented 4 years ago

I was just looking at this again @vebbo2 - I think we should probably update StronglyTyped to use the suggested metapackage configuration, as described in https://github.com/AArnott/CodeGeneration.Roslyn#create-the-metapackage?

vebbo2 commented 4 years ago

@andrewlock I didn't exactly follow with that example because main StronglyTypedId already contains references to Attributes and Generator projects through dependencies in nuspec file. But when I removed these dependencies and moved it to csproj (like in the example), build was failing because nuget package cannot be build if project contains neither any nuspec dependency nor any source file :/ That's why I left it as it is

andrewlock commented 4 years ago

@vebbo2 I've just made some tweaks in https://github.com/andrewlock/StronglyTypedId/pull/12 - Switched to using a 0-based enum for the Json type enum, and used the suggested metapackage config.

I'll push out a new release to NuGet shortly.

Thanks again for all your help! 😀