AutofacOnFunctions: version 1 released with .net framework support

Finally version 1 of AutofacOnFunctions is available!

Find the code on github. Have a look onto newest nuget package. Have a look onto the archive to support former versions.

Lots of changes

Due to the ongoing development of Azure Functions, there had been a lot of changes to the code. Additionally, the first version of AutofacOnFunctions now also support .net framework beside .net standard.

Support of .net framework

As of version 1.0.5 of AutofacOnFunctions, .net framework is now supported. You need to reference Microsoft.Net.Sdk.Functions 1.0.14, the apporach to use dependency injection with Azure Functions is identical. Have a look onto the read me in github to find out how easy it is to work this out.

Issues with Azure.Functions sdk higher than 1.0.19

There are two new versions out there, 1.0.21 and 1.0.22. These versions had an impact on the implementation. Due to referencing WebJobs 3.0.0-beta8 in 10.1.19 and breaking changes in microsoft.net.sdk.functions, Azure functions failed while getting packages. There error message looks like the following and is document in azure functions issue 950:

azure-functions-issue-950

This forces AutofacOnFunctions to only work since version 1.0.21 of Microsoft.Net.Sdk.Functions. Anyway, it is possible to work with former version of the Azure Functions Sdk, but you then need to stick to older nuget versions of AutofacOnFunctions, which is 0.3.0.

Removing reference to Azure Functions sdk

To support net framework as well, AutofacOnFunctions needed to get rid of the hard reference to Azure Functions sdk. As the consequence, Azure WebJobs are directly referenced in correct versions for .net framework and .net standard. All code changes in AutofacOnFunctions shall not influence your code. You just need to reference:

  • AutofacOnFunctions nuget package 1.0.5
  • Any Microsoft.Net.Sdk.Function higher than 1.0.19.

There are two samples available that work identically: