小编San*_*r_4的帖子

.netcore Azure 函数启动类未调用

我的 Azure 函数不会在本地调用启动类。运行项目时,我的断点没有命中 DependencyRegistrations.Register 函数。

包 Microsoft.Azure.Functions.Extensions 已正确安装

using Microsoft.Azure.Functions.Extensions.DependencyInjection;

[assembly: FunctionsStartup(typeof(MyNamespace.Startup))]

namespace MyNamespace
{
    public class Startup : FunctionsStartup
    {
        public override void Configure(IFunctionsHostBuilder builder)
        {
            DependencyRegistrations.Register(builder.Services);
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

为什么启动类没有被调用?

azure .net-core azure-functions

3
推荐指数
2
解决办法
4425
查看次数

标签 统计

.net-core ×1

azure ×1

azure-functions ×1