Closed sergey-tihon closed 4 years ago
I get the same error when using an external type in the signature of a method in the TPDTC. Although in my case it's a runtime method I don't actually need in the TPDTC, so I can just #if
it out.
Thank you @Tarmil for the idea, seems that I also can use this workaround and do not include custom JsonConverter
s into design-time assembly and compile them only into Runtime assembly.
I also created simpler repro for this bug - https://github.com/sergey-tihon/tp-inherit-bug and updated Repro steps
in this issue.
@sergey-tihon Your repro now runs successfully, without even having to update ProvidedTypes.*
. I'm guessing this has been fixed in the compiler some time during the last year and a half then?
My error case in Bolero seems fixed too, I can remove my #if
s and it works.
Thank you @Tarmil, you are right, it works now.
Description
When I add type
OptionConverter
inherited fromJsonConverter
that is defined insideNewtonsoft.Json.dll
to runtime&design time assemblies, compilation fails with error
but when I comment class with inheritance
OptionConverter
but leave usage ofNewtonsoft.Json.dll
from other places - it loadsNewtonsoft.Json.dll
correctly.There is an another error on the screenshot (but it is not related to dependency resolution) - this version is in
inherit
branch - https://github.com/sergey-tihon/SwaggerProvider2/commit/62a9d46880ffe51822facac3d82dceda9776dc75Repro steps
dotnet build
Expected behavior
Successful compilation
Actual behavior
Known workarounds
I guess that it should be possible to define such types in another assembly and load as dependency... but i did not try it yer (I hope that @dsyme know the line when we forgot to remap types ;-) )
Related information
master
(2018-10-31)