I finally found out how to use the ASP.Net in a classlib, this is frankly really stupid... This EmbedIo was a incredible waste of time.
I really don't know how could I miss this:
Use ASP.NET Core APIs in a class library
It works... so get rid of the motherfucking EmbedIO.