C# script function apps beyond Azure portal
Creating a C# function app in the Azure portal is incredibly simple and great for playing and learning. I love the simplicity and light-ness that comes from just having a single
.csxscript file with everything you need for the function. The more "serious" approach with a "proper" C# project, the functions SDK and the corresponding CI/CD setup seems quite the leap, in comparison.
I recently had to move a bunch of functions from one subscription to another and wanted to take the chance to improve the maintainability for some in-portal functions I had. Moving them also failed in the portal, so I looking at a non-enjoyable time copying/pasting files over. Made me question why I used in-portal functions at all.
So, while trying to save myself some time doing that, I got a zip of the existing in-portal function app using the Kudu debug console at https://[APP_NAME].scm.azurewebsites.net/DebugConsole, and simply clicking the download icon next to the wwwroot folder:
Well, that *totally* works, and you can keep the simplicity of the
.csxwhile having a proper deployment history (and rollback capabilities) you're likely going to need sooner or later, no matter how simple the function.
I couldn't get rid of the function.json file though, so placing the Functions SDK attributes on the code in the .csx doesn't work, but I'd say it's an acceptable trade-off.