Field not found: 'Nancy.Bootstrapper.NancyBootstrapperLocator.Bootstrapper'

I recently used Nancy fx and I'm in love with it, but when I try to make the moc ioc structure like on the documentation page, I suggest an error

Field not found: "Nancy.Bootstrapper.NancyBootstrapperLocator.Bootstrapper".

i overrides the getApplicationContainer function as shown in the file

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

but still get the same error, I look at the code in the rnancy repository https://github.com/NancyFx/Nancy.Bootstrappers.StructureMap/blob/master/src/Nancy.Bootstrappers.StructureMap/StructureMapNancyBootstrapper.cs and I can not see bootstrapper property

I have another error, I try to configure it for hours, if I remove the nancyst structuremap in the nugget the error will disappear.

or do I need to install something else in the bootstrap class.

+5
source share
1 answer

I came across this scenario after installing Nancy.Bootstrappers.Ninject from Nuget. My Nancy project was created using Nancy Visual Studio templates and referenced Nancy 0.21.1.

I found that installing the bootstrapper package forced the Nancy base package to upgrade from 0.21.1 to 0.23.2. This is great, except that the Nancy.Hosting.Aspnet and Razor packages Nancy.Hosting.Aspnet not been updated since 0.21.1.

To fix the error, I had to update all the packages related to Nancy that I used to match the 0.23.2 package.

+11
source

Source: https://habr.com/ru/post/1200634/


All Articles