I have a solution with 5 .NET Core 3.1 projects in Visual Studio 2019 16.4.3 with the following structure and references:
MyProject.Core (Class Library)
- Project Reference to MyProject.SharedKernel
MyProject.Infrastructure (Class Library)
- Project Reference to MyProject.Core
MyProject.SharedKernel (Class Library)
- EnsureThat NuGet Package Reference
MyProject.Function (Azure Function v3 Class Library)
- Project Reference to MyProject.Core
- Project Reference to MyProject.SharedKernel
- Project Reference to MyProject.Infrastructure
MyProject.Web (ASP.NET Core 3.1)
- Project Reference to MyProject.Core
- Project Reference to MyProject.SharedKernel
- Project Reference to MyProject.Infrastructure
From MyProject.Web I am able to use the EnsureThat library with no issues because if references MyProject.SharedKernel which in turn has the reference to the EnsureThat NuGet package. For some reason, I am unable to do the same in the MyProject.Function project even though it has the exact same reference to MyProject.SharedKernel.
Is there something about an azure function class library that prevents transitive references from working properly? I would prefer not to have to also install the EnsureThat NuGet package in the MyProject.Function project directly.


