找不到字段:'Nancy.Bootstrapper.NancyBootstrapperLocator.Bootstrapper'

Car*_*pez 5 structuremap nhibernate nancy

我最近一直在使用Nancy fx并且我喜欢它,但当我尝试制作一个结构图ioc像文档页面建议我得到错误

找不到字段:'Nancy.Bootstrapper.NancyBootstrapperLocator.Bootstrapper'.

我已经覆盖了文件中显示的getApplicationContainer函数

https://github.com/CarlosBolanos/apadrina/blob/master/Application/Bootstrapper.cs

但仍然得到相同的错误,我看看rnancy存储库上的代码 https://github.com/NancyFx/Nancy.Bootstrappers.StructureMap/blob/master/src/Nancy.Bootstrappers.StructureMap/StructureMapNancyBootstrapper.cs 和我不能看看bootstrapper属性

任何其他人也有这个错误我一直试图设置这几个小时,如果我删除nugget中的nancystructuremap错误消失.

或者我需要在bootstrap类上设置其他东西.

ken*_*ada 12

Nancy.Bootstrappers.Ninject从Nuget 安装后我遇到了这种情况.我的Nancy项目是使用Nancy Visual Studio模板创建的,并且引用了Nancy 0.21.1.

我发现安装bootstrapper软件包导致基本Nancy软件包从0.21.1升级到0.23.2.这很好,除了Nancy.Hosting.AspnetRazor和Razor引擎包没有从0.21.1升级.

为了解决这个错误,我不得不更新我用来匹配0.23.2软件包的所有与Nancy相关的软件包.