autofac - 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'
解决方案
推荐阅读
- django - Django中的TDD,如何对我的模型进行单元测试?
- python - Numpy Python:如何从列表中获取最频繁的 20 项
- apache-kafka - 卡夫卡暂停和恢复消息丢失
- c# - 通过 SSL (HTTPS) 使用 HttpWebRequest
- qt - 用于绘制数据的 Qt:截取窗口然后关闭窗口
- django - 在不接触模板的情况下使用引导程序拥有外部 django 应用程序?
- reactjs - React Native - 我似乎无法让 Axios 和 AsyncStorage 在 Android 中一起工作,但代码在 iOS 上工作?
- c# - 实现接口的实体的通用配置
- mysql - mysql数据过滤
- python - glob 与 if 语句来选择哪些文件存储到一个变量?