簡體   English   中英

版本 3 停用后創建 azure .NET 版本 3 函數

[英]Create azure .NET version 3 function after version 3 discontinuation

最近,.NET 對 azure function 3 版本的支持已經終止。 我仍然需要創建 azure 版本 3 函數應用程序,直到將它們遷移到版本 4。當我嘗試通過 azure DevOps 管道代理在版本 3 中創建函數應用程序時,我得到運行時找不到異常。 任何解決方案表示贊賞。

 az functionapp create --name ${{FunctionName }} --os-type Windows --resource-group ${{resourceGroup }} --storage-account ${{ appTierStorageAccountName }} --runtime dotnet --functions-version 3 --plan ${{ appServicePlan }} --app-insights ${{ appInsightsName }} --app-insights-key $(AppInsightsInstrumentationKey)

在此處輸入圖像描述

通過在版本 4 中創建函數應用程序對此進行排序,因為它當前允許 dotnet 運行時並稍后降級函數版本

  1. 創建函數應用,設置設置並重啟應用服務

     az functionapp create --name ${{ clientFunctionName }} --os-type Windows --resource-group ${{ resourceGroup }} --storage-account ${{ storageAccountName }} --runtime dotnet --functions-version 4 --plan ${{ appServicePlan }} --app-insights ${{ appInsightsName }} --app-insights-key $(appInsightsInstrumentationKey) az functionapp config appsettings set --name ${{ clientFunctionName }} --resource-group ${{ resourceGroup }} --settings FUNCTIONS_EXTENSION_VERSION=3 az functionapp restart --name ${{ clientFunctionName }} --resource-group ${{ resourceGroup }}
  2. 部署函數應用

  3. 根據需要設置 .NET 版本

     az functionapp config set --name ${{ clientFunctionName}} --resource-group ${{ resourceGroup }} --net-framework-version v6.0

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM