首页 > 解决方案 > Autofac 如何监听特定的错误信息

问题描述

当我使用 Autofac 扫描程序集时,使用 Build 时出现异常。如何在哪个程序集中侦听错误

ContainerBuilder _builder = new(); _builder.RegisterAssemblyTypes(组件);

_container = _builder.Build(); //出现异常 System.IO.FileNotFoundException:“Could not load file or assembly 'Microsoft.AspNetCore.Mvc.Core, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'

标签: autofac

解决方案


推荐阅读