Fody / LoadAssembliesOnStartup

Loads all the references on startup by actually using the types in the module initializer.
MIT License
36 stars 10 forks source link

Fody/LoadAssembliesOnStaertup not working in Azure Function #500

Open paulprivalgo opened 3 months ago

paulprivalgo commented 3 months ago

Hello

I have an Azure function with references to Fody and Fody.LoadAssembliesOnStartup

MyAssembly

However, when I run the application and go to register the services the services are not loaded so therefore are not registered

Is there something specific that needs to be done for Azure Funcitons?

Paul

GeertvanHorrik commented 3 months ago

We don't use Azure Functions ourselves, but assuming they are using a normal runtime, as soon as the assembly loads, this should load the dependencies. You can check the generated IL (e.g. via ILSharp) to see if it correctly loads the assemblies.