gpt4 book ai didi

.net - .NET7 升级后,在本地运行 Azure 函数会出现 "No runtime"错误

转载 作者:行者123 更新时间:2023-12-02 23:12:43 25 4
gpt4 key购买 nike

最近我想升级我的Azure功能以使用.NET 7。由于某些原因,在完成所有必需的步骤后,当我想运行任何函数时,我不断收到此错误消息框告诉

There is no Functions runtime available that matches the versionproject specified by the project

我检查了 .csproj 文件中的设置是否正确:

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
<OutputType>Exe</OutputType>
<RootNamespace>$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
<_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput>
<ImplicitUsings>enable</ImplicitUsings>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>

是的,它是用小写的 v 拼写的,表示“v4”。我检查了是否根据我的体系结构(64 位 Windows)安装了 .NET7 的托管 bundle ,并在安装后重新启动了 IIS 服务。我尝试了干净重建,重新打开 Visual Studio,重新启动我的计算机,但似乎没有任何效果。我还安装了 .NET 7 SDK,并且正在使用 Visual Studio 2022。如果需要更多信息,我将相应更新我的问题。谢谢!

最佳答案

我最终找到了适合我的案例的解决方案,如果其他人遇到它,我会将其发布在这里。正如 this 的评论中提到的Github问题,我不得不去

Tools -> Options -> Projects & Solutions -> Azure functions and clickon the "Check for updates" button.

enter image description here

然后我必须下载并安装待处理的更新。

enter image description here

这似乎解决了我的问题。希望这个解决方案也能帮助其他人。

关于.net - .NET7 升级后,在本地运行 Azure 函数会出现 "No runtime"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/75146087/

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