2

I am trying to run SGEN against one of dlls. I am getting error:

"error CS0012: The type 'System.Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.".

But netstandard dll in matching version is already referenced in csproj, and also passed as command parameter. Dll is ".NET Framework 4.7.2". Same command works against some other dlls in solution.

What might be causing it?

PiotrR
  • 95
  • 7
  • https://github.com/dotnet/sdk/issues/1630 – Hans Passant Oct 02 '19 at 14:03
  • 1
    Solutions discussed in are different ways of disabling GenerateSerializationAssemblies step. I am not using GenerateSerializationAssemblies step, but rather SGEN task directly, so that I can generate serializers for picked types only. Error is same, but there is no solution there AFAIK. – PiotrR Oct 03 '19 at 05:54

0 Answers0