Including Autofac.Module in custom module breaks Orchard

淺唱寂寞╮ 提交于 2019-12-07 09:17:23

Bah! It was a versioning issue.

Starting the site with debugger attached, and breaking on all exceptions revealed things like this:

{"Could not load file or assembly 'Autofac, Version=3.3.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"Autofac, Version=3.3.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da"}

I'd added Autofac from nuget, but Orchard itself was using a bundled version that was different. Removing my nuget reference to Autofac and re-adding by locating the bundled copy of Autofac.dll made the problem go away.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!