Thanks @MuthuKumaranMurugaachari-MSFT
I've found out that the project was build with a dotnet framework runtime. Once I created a new isolated (dotnet-isolated) project and use the same code and references it started working.
One thing that I found out though when deployed to Azure, is that I can't do a Test/Run in the portal. But it can be triggered by Logic App. Do not know if this is a behavior of a non-isolated function app
.