DLL not removed from bin directory on Azure deploy

I have a project which was using Elmah.Mvc.dll, but I removed it from my project references.
A deploy to DEV (IIS on a local VM) showed that it was successfully removed
A deploy to PROD (Azure website) gave me errors, then I noticed that the file (Elmah.Mvc.dll) was still in the bin directory in my Azure website although all other updates were correct.

After removing the file through the VS Azure browser, everything started working fine.

Hi Mark,

By default, when deploying to Azure Websites, Octopus does not remove additional files.

From version 3.1, there is a Remove files that are not part of the deployment check-box on the Azure Web App step. Checking this will… do the obvious.

If you are using 3.0, from >= 3.0.12, you can set a variable Octopus.Action.Azure.RemoveAdditionalFiles to achieve the same.

I hope this helps,

Michael