unoplatform / Uno.CodeGen

A set of source generators for equality, immutability, ...

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to build using dotnet core

carldebilly opened this issue · comments

Bug report

Unable to build a project using Uno.CodeGen on the dotnet core platform from
command line.

Repro steps

  1. Create a new dotnet core project.
  2. Add reference to Uno.CodeGen
  3. Build from command line:
    C:\myproject>dotnet build myproject.csproj

Current behavior

We're getting an error like that:

C:\Users\[...]\.nuget\packages\uno.sourcegenerationtasks\1.31.0\build\netstandard1.0\Uno.SourceGenerationTasks.targets(122,2): error : Generation failed, error code -2147450740 [C:\src\[projectfolder]\[projectfile].csproj]

Expected behavior

Should compile without errors.

Extra information

Building using MSBuild won't produce this error:

C:\myproject>msbuild myproject.csproj
[...]
Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:07.12

Environment

Dotnet Code 2.2
Nuget Package: 1.31.0

Any update on this issue?

We build using dotnet under linux, more specifically within the microsoft/dotnet:2.2-sdk docker image. All of our CI/CD pipelines resolves around docker.

Not being able to build using dotnet is a problem for us. I feel like this probably hinders Uno.CodeGen adoption by the community.

Should be addressed by unoplatform/Uno.SourceGeneration#113. It will require .NET Core 3.0, though.