azure - 如何将 Azure Functions v3 迁移到 .net core 5.0

标签 azure .net-core azure-functions azure-functions-runtime

我已将 Azure Function v3 项目中的所有程序集升级到版本 5.0,但无法运行该函数。这是我函数的 csproj 文件的部分定义:

<PropertyGroup>
    <TargetFramework>netcoreapp3.1</TargetFramework>
    <AzureFunctionsVersion>v3</AzureFunctionsVersion>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.Azure.Functions.Extensions" Version="1.1.0" />
    <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="4.0.3" />
    <PackageReference Include="Microsoft.NET.Sdk.Functions" Version="3.0.11" />
    <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.SignalRService" Version="1.2.2" />
    <PackageReference Include="System.Net.Http" Version="4.3.4" />
  </ItemGroup>

使用 .NET 5 实现此功能所需的解决方法是什么?谷歌没有得出任何结论。

Further info: 5.0.100 [C:\Program Files\dotnet\sdk]

这是我收到的错误消息之一:

Could not load file or assembly 'Microsoft.Extensions.Configuration.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.

最佳答案

Azure 函数团队通过引入新的隔离进程模型来运行 .NET 函数应用,发布了对 .Net 5 的支持。

您可以在announcement中阅读更多相关信息。 .

要将函数应用迁移到 .Net 5,您可以按照此 guide 进行操作。 .

关于azure - 如何将 Azure Functions v3 迁移到 .net core 5.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64840338/

相关文章:

azure - 为什么要为 Azure Functions 加载开发配置,而它应该是生产配置?

azure - 无法在 Azure Application Insights 上找到异常

c# - Swagger - 添加用户名/登录名并在自定义 header 中使用

.net - 如何从用 .NET Framework 编写的应用程序加载 .NET Core 程序集?

.net-core - 具有 Null 值的 Blazor 参数

azure - 使用 NotificationHub 集成在 Visual Studio 上创建的 Azure 函数时出错

Azure 诊断日志保存到另一个位置

windows - 使用 net use 在 Azure VM 中装载文件共享时出现 NativeCommandError

.net-core - 部署到 AppService 无法识别环境变量

c# - IronPDF 对 System.Drawing.Common 的依赖