This project is read-only.

RegisterMvcControllers not available in non-mvc project

Jan 13, 2015 at 7:44 PM
I have a good Onion Architecture setup, with one sole Bootstrapper project which is built and dll copied to the ../Web/bin when built. Nothing references it (the bootstrapper project), using WebActivator my PreApp startup methods run fine. But when I install SimpleInjector.Integration.Web.MVC using nuget, and look at the references, it always has an exclamation point and the path is empty. Even if I manually remove the reference (not uninstall-package), then re-add it pointing to my packages directory, the exclamation is shown and path is empty on the reference. This missing dependency is not allowing me to call container.RegisterMvcControllers - any idea why this may be happening?

It always says 1 error when building but does not show any errors in the error list or output.

My web project is MVC 5, could it be a dependency issue?
Jan 14, 2015 at 8:17 AM
This is not a known issue. I just tested this by creating a new MVC5 project in Visual Studio 2013 and add the SimpleInjector.Integration.Web.Mvc Nuget package using the package manager UI, but it works as expected. The assembly references are added correctly and everything compiles.

You might want to try this with an empty project to see if it works in that project and compare this with your bootstrapper project. It might be that NuGet is screwing things up. This happens from time to time.