I have a piece of code that I can run in four ways
Debug build - in the debugger - works just fine
Debug build - outside debugger - fails
Release build - in the debugger - fails
Release build - outside debugger - fails.
The error code is gives in all cases is 202 - something to do with parameterless constructors, call stack at the bottom.
It fails at the same point in each case, when it is building the first object it is asked for.
I can't build the source with debug because I am using .Net 4.0 and don't seem to have the .Net 2.0 SDK installed in order to build it.
I am starting to run out of ideas....
Exception:
Test method DataLoaders.Integration.ContactMappingTests.EntityContactMappingTest threw exception:
StructureMap.StructureMapException: StructureMap Exception Code: 202
No Default Instance defined for PluginFamily System.Uri, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Callstack:
StructureMap.BuildSession.<.ctor>b__0(Type t)
StructureMap.Util.Cache`2.get_Item(KEY key)
StructureMap.BuildSession.CreateInstance(Type pluginType)
StructureMap.Pipeline.DefaultInstance.build(Type pluginType, BuildSession session)
StructureMap.Pipeline.Instance.createRawObject(Type pluginType, BuildSession session)
StructureMap.Pipeline.Instance.Build(Type pluginType, BuildSession session)
StructureMap.Pipeline.ConstructorInstance.Get[T](String propertyName, BuildSession session)
StructureMap.Pipeline.Arguments.Get[T](String propertyName)
lambda_method(Closure , IArguments )
StructureMap.Construction.BuilderCompiler.FuncCompiler`1.<>c__DisplayClass2.<CreateBuilder>b__0(IArguments args)
StructureMap.Construction.InstanceBuilder.BuildInstance(IArguments args)
StructureMap.Pipeline.ConstructorInstance.Build(Type pluginType, BuildSession session, IInstanceBuilder builder)
StructureMap.Pipeline.ConstructorInstance.build(Type pluginType, BuildSession session)
StructureMap.Pipeline.SmartInstance`1.build(Type pluginType, BuildSession session)
StructureMap.Pipeline.Instance.createRawObject(Type pluginType, BuildSession session)
StructureMap.Pipeline.Instance.Build(Type pluginType, BuildSession session)
StructureMap.Pipeline.ObjectBuilder.Resolve(Type pluginType, Instance instance, BuildSession session)
StructureMap.BuildSession.CreateInstance(Type pluginType, Instance instance)
StructureMap.BuildSession.<>c__DisplayClass3.<.ctor>b__1()
StructureMap.BuildSession.CreateInstance(Type pluginType)
StructureMap.Container.GetInstance[T]()
StructureMap.ObjectFactory.GetInstance[PLUGINTYPE]()
DataLoaders.Processor.ProcessData(DataConfig config) in D:\TFS\Main\Source\DataLoaders\DataLoaders\Processor.cs: line 20