gpt4 book ai didi

azure - Azure Function App 的 Visual Studio 2022 和 .net 更新问题

转载 作者:行者123 更新时间:2023-12-05 03:32:10 25 4
gpt4 key购买 nike

我一直在为我的 Azure Function App 使用 Visual Studio 2019。我最近更新到版本 2022,然后卸载了 2019。

我现在收到以下错误:

 1>CodeaApi -> G:\AVR_Project\Codea App\Codea Azure Function App\bin\Debug\netcoreapp3.1\bin\CodeaApi.dll
1>C:\Users\asf\.nuget\packages\microsoft.net.sdk.functions\3.0.6\build\Microsoft.NET.Sdk.Functions.Build.targets(41,5): error : It was not possible to find any compatible framework version
1>C:\Users\asf\.nuget\packages\microsoft.net.sdk.functions\3.0.6\build\Microsoft.NET.Sdk.Functions.Build.targets(41,5): error : The framework 'Microsoft.NETCore.App', version '3.0.0' (x64) was not found.
1>C:\Users\asf\.nuget\packages\microsoft.net.sdk.functions\3.0.6\build\Microsoft.NET.Sdk.Functions.Build.targets(41,5): error : - The following frameworks were found:
1>C:\Users\asf\.nuget\packages\microsoft.net.sdk.functions\3.0.6\build\Microsoft.NET.Sdk.Functions.Build.targets(41,5): error : 6.0.1 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
1>C:\Users\asf\.nuget\packages\microsoft.net.sdk.functions\3.0.6\build\Microsoft.NET.Sdk.Functions.Build.targets(41,5): error :
1>C:\Users\asf\.nuget\packages\microsoft.net.sdk.functions\3.0.6\build\Microsoft.NET.Sdk.Functions.Build.targets(41,5): error : You can resolve the problem by installing the specified framework and/or SDK.
1>C:\Users\asf\.nuget\packages\microsoft.net.sdk.functions\3.0.6\build\Microsoft.NET.Sdk.Functions.Build.targets(41,5): error :
1>C:\Users\asf\.nuget\packages\microsoft.net.sdk.functions\3.0.6\build\Microsoft.NET.Sdk.Functions.Build.targets(41,5): error : The specified framework can be found at:
1>C:\Users\asf\.nuget\packages\microsoft.net.sdk.functions\3.0.6\build\Microsoft.NET.Sdk.Functions.Build.targets(41,5): error : - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=3.0.0&arch=x64&rid=win10-x64
1>C:\Users\asf\.nuget\packages\microsoft.net.sdk.functions\3.0.6\build\Microsoft.NET.Sdk.Functions.Build.targets(41,5): error :
1>C:\Users\asf\.nuget\packages\microsoft.net.sdk.functions\3.0.6\build\Microsoft.NET.Sdk.Functions.Build.targets(41,5): error : Metadata generation failed.
1>Done building project "CodeaApi.csproj" -- FAILED.

我是否需要安装版本 3.0.1 才能使其与 Azure Function Apps 兼容?

最佳答案

是的,您可以通过安装 .NET Core 3.1 SDK 来解决此问题,

When targeting Azure Functions 3.0, by default, the .NET Core 3.1 SDKis required on the machine building the project.

关于azure - Azure Function App 的 Visual Studio 2022 和 .net 更新问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70506923/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com