Kzu's Today I Learned
GitHubX/TwitterBlog
  • Today I Learned
  • dotnet
    • How to emit descriptions for exported JSON schema using JsonSchemaExporter
    • NuGet
      • Suppress dependencies when packing
      • Hide contentFiles from your nuget packages
      • Packaging transitive analyzers with NuGet
      • How to add search to static nuget feed
      • Populate RepositoryBranch in CI for NuGet Pack
    • Ignore folder from dotnet-format
    • Accessing Tor .onion URLs via HttpClient with .NET6
    • Installing .NET 5.0 on Raspberry Pi 4
    • Quickly check C# compiler and language version
    • Disable diagnostic analyzers for entire folder/submodules
    • Persisting output files from source generators
    • Use C# 9 records in non-net5.0 projects
    • AsyncLocal never leaks and is safe for CallContext-like state
    • Using HashCode in .NETFramework
    • How to locate dotnet
  • testing
    • Conditional unit tests
    • Skip tagged scenarios in SpecFlow with Xunit
  • msbuild
    • How to get user home dir ~ cross-platform
    • Modifying the build for every solution in a repository
    • Detect CI builds for every CI system
    • Modify all command-line builds in entire repo
    • Write entire XML fragments in MSBuild with XmlPoke
    • How to select first item in an ItemGroup
    • How to include commit URL in nuget package description
    • How to include package reference files in your nuget
    • How to build project when content files change
  • azure
    • How to launch multiple Azure Functions apps on different ports
    • C# script function apps beyond Azure portal
    • Publishing function app from GitHub folder
    • Exploring Azure Data with Kusto and Dashboards
    • Shared secret authorization with Azure SignalR Service
    • Using Azure File Copy from DevOps yaml pipeline
    • Code-less redirection with serverless Azure Functions
  • DevOps/CI/CD
    • How to run Azure Storage unit tests in CI
    • How to skip steps or jobs in GitHub Actions for PRs from forks
    • Update version and publish npm from GH
    • Push to protected branch from GitHub actions
Powered by GitBook
On this page
  1. azure

C# script function apps beyond Azure portal

PreviousHow to launch multiple Azure Functions apps on different portsNextPublishing function app from GitHub folder

Last updated 3 years ago

Creating a C# is incredibly simple and great for playing and learning. I love the simplicity and light-ness that comes from just having a single .csx script file with everything you need for the function. The more "serious" approach with a "proper" and the corresponding CI/CD setup seems quite the leap, in comparison.

I 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 , and simply clicking the download icon next to the wwwroot folder:

Well, that *totally* works, and you can keep the simplicity of the .csx while 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.

And that's where it clicked: why not just put all those files in my own and deploy straight from there via a ?

GitHub repo
subfolder
function app in the Azure portal
C# project, the functions SDK
recently had to move
https://[APP_NAME].scm.azurewebsites.net/DebugConsole