Drizin / CodegenCS

C# Toolkit for Code Generation (T4 alternative!)
MIT License
246 stars 32 forks source link

Unable to run dotnet build #34

Open wkit23 opened 3 days ago

wkit23 commented 3 days ago

I tried to use the newer MSBuild Task project. It works if I build my project via Visual Studio but it failed if I try to run it via dotnet build. The following error message was shown:

Failed to run CodegenCS Template 'xxx\CodegenCS-master\Samples\MSBuild1\Template2.csx': 'CodegenCS - error running template: Can't create abstract type CodegenCS.ICodegenOutputFile' [xxx\CodegenCS-master\Samples\MSBuild1\MSBuild1.csproj]

I have the same error for my project and the sample project. Currently tested using .Net SDK 8

Drizin commented 11 hours ago

Please try with new version CodegenCS.MSBuild 3.5.2

This wasn't an easy fix, so if it works please consider buying me a coffee.