Below is a Azure pipeline YML file to deploy a .NET Windows function to an Azure .NET Windows function.
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- main
pool:
  vmImage: windows-latest
steps:
- script: echo Hello, world!
  displayName: 'Run a one-line script'
- task: DotNetCoreCLI@2
  inputs:
    command: publish
    arguments: '--configuration Release'
    projects: '**/MyProjectName.csproj'
    publishWebProjects: false
    modifyOutputPath: false
    zipAfterPublish: true
- task: AzureFunctionApp@2
  inputs:
    connectedServiceNameARM: 'Azure subscription 1(00000000-0000-0000-0000-000000000000)'
    appType: 'functionApp'
    appName: 'my-function-name'
    package: '$(System.DefaultWorkingDirectory)/**/*.zip'
    deploymentMethod: 'auto'