AArnott / CodeGeneration.Roslyn

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

Is 0.5.13 an official release? Upgrade breaks existing projects #125

Closed ugumba closed 5 years ago

ugumba commented 5 years ago

0.5.13 is available on nuget, but upgrading breaks projects which have been working fine with 0.4.88. "dotnet-codegen --version" fails.

ugumba commented 5 years ago

My apologies.

I was actually missing DotNetCliToolReference in the csproj. I had assumed it was not needed, since the nupkg's .props includes the line, but "dotnet restore" does not seem to look deeper than the .csproj when looking for these references. Further, my "packages/.tools" already contained "dotnet-codegen/0.4.88", so I never needed to restore until I upgraded to 0.5.13.

Once this stuff works, it's brilliant - thanks! Just wish dotnet codegen was quite a bit faster! :-)

amis92 commented 5 years ago

Thanks for self-follow-up :)

dominikjeske commented 5 years ago

For me it is still breaking after update to 0.5.13. I also updated the versin in DotNetCliToolReference but have following error:

codegen

@ugumba did you do anything else beside update DotNetCliToolReference ?

amis92 commented 5 years ago

@bigdnf if you could specify how exactly are you using the DotNetCliToolReference (in which file) it would be helpful. This DotNetCliTool feature is very error-prone and poorly supported via .NET Core SDK, as it turns out.

dominikjeske commented 5 years ago

Like below - it worked with previous version. It was used like this in every csproj.

roslyn2

amis92 commented 5 years ago

@bigdnf is cloning https://github.com/jaredthirsk/CodeGeneration.Roslyn.Walkthrough and updating the version in Walkthrough.Foo.csproj working and building correctly? It's the simplest project possible. Works for me. Maybe there's an issue with .NET Core SDK of yours, or some other thing?

dominikjeske commented 5 years ago

Ok I have it working - I'm not sure what exactly helped but for others with this problem I have

Now it works :)

amis92 commented 5 years ago

Umm if you've removed all .NET Core SDKs, it shouldn't actually work, you know. 👀

But I'm happy it works for you now :)

dominikjeske commented 5 years ago

heh yes I missed one point - I installed most resent stable .NET Core SDK