StructureMap configuration failures. Error 170. Please, what is going on?

1,491 views
Skip to first unread message

shapper

unread,
Nov 11, 2010, 12:46:43 PM11/11/10
to structuremap-users
Hello,

I am updating a project from MVC 3 Beta to RC and I get the following
error with Structure Map:

StructureMap configuration failures:
Error: 170
Source: Registry: StructureMap.Configuration.DSL.Registry,
StructureMap, Version=2.6.1.0, Culture=neutral,
PublicKeyToken=e60ad81abae3c223
Unable to find the exported Type's in assembly Microsoft.Web.Mvc,
Version=3.0.0.0, Culture=neutral, PublicKeyToken=null. One or more of
the assembly's dependencies may be missing.

Method 'GetControllerSessionBehavior' in type
'Microsoft.Web.Mvc.MvcDynamicSessionControllerFactory' from assembly
'Microsoft.Web.Mvc, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=null' does not have an implementation.
System.TypeLoadException: Method 'GetControllerSessionBehavior' in
type 'Microsoft.Web.Mvc.MvcDynamicSessionControllerFactory' from
assembly 'Microsoft.Web.Mvc, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=null' does not have an implementation.
at
System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly
assembly, ObjectHandleOnStack retTypes)
at System.Reflection.RuntimeAssembly.GetExportedTypes()
at
StructureMap.Graph.TypePool.<>c__DisplayClass2.<.ctor>b__0(Assembly
assembly)

What is strange is that I have the Microsoft.Web.Mvc assembly as
reference.

Then out of the sudden I stopped getting this error! And now I am
getting it again!

Always in this line of code:

public StructureMapDependencyResolver(IContainer container) {

_container = container;

// ERROR HAPPENS HERE >>>
_container.Configure(x => x.Scan(y => {
y.AssembliesFromApplicationBaseDirectory();
y.WithDefaultConventions();
y.LookForRegistries();
}));

} // ContainerResolver

I really have no idea why is going on.

Does anyone has any idea what is going on?

Thank You,
Miguel

Robin Clowers

unread,
Nov 12, 2010, 12:59:41 PM11/12/10
to structuremap-users
Are you missing some of the new dependencies of MVC 3? I know it
depends on the new "asp.net web pages" stuff from web matrix.
Reply all
Reply to author
Forward
0 new messages