I figured it out adding Microsoft.Extensions.Logging.Abstractions.dll,Microsoft.Extensions.Logging.dll and Microsoft.Extensions.Options.dll solved the problem. I don't know why, but seems iText7 use them for logging or some other purpose. I post here in case someone encounter the similar problem.