Azure Function Deployment with Octopus causes Assembly version errors, doesn't happen when deploying from Visual Studio

  1. We deploy a Function to Azure FunctionApp, using Octopus - Deploy an Azure Web App - as per https://octopus.com/blog/azure-functions
    a. Function Deploys ok.
    b. Trigger function
    c. Function Host is restarted with references to Assembly reference changes detected.

2019-01-09T00:23:58.706 [Info,ProcessStudyResultForGateway] Assembly reference changes detected. Restarting host…
2019-01-09T00:23:58.706 [Info] Environment shutdown has been triggered. Stopping host and signaling shutdown.
2019-01-09T00:23:59.487 [Info] Job host stopped

  1. We deploy a Function to Azure FunctionApp, using Visual Studio Publish
    a. Function Deploys ok.
    b. Trigger function
    c. Function Host does not restart and functions run as expected.

  2. We deploy a Function to Azure FunctionApp, using Octopus, once again.
    a. Function Deploys ok.
    b. Trigger function
    c. Function Host does not restart and functions run as expected.

As such, it seems Visual Studio is performing some type of MS magic, to optimize the code, and decide on how to resolve some assembly dependencies.

We know we have a Dependency Hell situation, but unfortunately, we’re not in a position to resolve that right now, (indeed, its actually difficult to see exactly what needs to be resolved, as the Microsoft logging of what its detecting as being in conflict leaves a lot to be desired. that is, there is no logging.)

We have a very unique architecture - Azure function invokes a Legacy executable! which we’re also migrating to a dll, but tbh, I don’t foresee this resolving the issue, rather potentially more likely to exacerbate it.

We have a support case open with Microsoft, but aren’t making any headway there.

I cannot find many examples of this online, nor any relating specifically to Octopus deploys.
Is this something that you’ve seen in the past with Octopus deployments?
Is there any plans to support MSDeploy type deployments, (or do you perceive this as how functions are currently deployed, using the Web App Deployment task?)
I know this task was never designed to deploy functions, but some enterprising soul discovered it could, and is now the official approach.

We deploy other functions using this task, and it works well for those. Just missing that little bit of VS magic for this one!

Thanks for reading, hope to hear back.

Mark Van Cooten
Release Engineer,
Volpara Solutions.

Hi Mark,

Thanks for getting in touch.

Unfortunately I don’t think there’s anything we can to do resolve this particular issue.

What I can say though is that we have been discussing adding a specific step for deploying azure functions, but no work has been started on it as of yet so I can’t give you an ETA.

My apologies for not having any better news for you.

Thank you and best regards,
Henrik

Ok, thanks for the response. +1 for the interest in a dedicated Azure Functions Deployment task, I guess. Really don’t want to orchestrate AzureDevOps MSDeploy Task from Octopus. (We’re already orchestrating Octopus from AzureDevOps Pipelines in some places… would do my head in. :smiley: )

Hi Mark,

We have this UserVoice idea to add first-class support for Azure Functions. I’d suggest you add your vote for that as we continually look through our UserVoice for features to add to the product.

Thank you,
Henrik