Getting StructureMap to Work with MVC4 RC and Web API
Date Published: 17 July 2012
At the moment (18 July 2012) if you install the NuGet package structuremap.MVC4, it will not compile due to breaking changes in the ASP.NET MVC4 RC distribution. You have to jump through some extra hoops to get this working. Here are two posts that help:
However, even with both of these getting things working wasn’t quite as easy as I would have liked. Here are two full files with namespaces showing what I used to get things working (Gist 3135943). I assume the NuGet package will be updated to be correct once MVC4 ships.
Category - Browse all categories
About Ardalis
Software Architect
Steve is an experienced software architect and trainer, focusing on code quality and Domain-Driven Design with .NET.