StructureMap configuration failures Error 104

485 views
Skip to first unread message

Andrew

unread,
May 11, 2009, 12:28:23 PM5/11/09
to structuremap-users
I cannot figure out why I'm getting this error:

Registry: StructureMap.ConfigurationExpression,StructureMap
Type Instance 'e603191a-c248-4d7c-9e2d-00e763764ebf' (Smart Instance
for Test.UI.VehicleSelection.VehicleViewModel) cannot be plugged into
type Test.UI.VehicleSelection.IVehicleViewModel, Test.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-----------------------------------------------------------------------------------------------------

I am registering other view models the exact same way and they work
flawlessly. Here is what the code looks like.

public interface IView {}

public interface IViewModel {
IVew View {get;}
}

public interface IVehicleViewModel : IViewModel {}

public class VehicleViewModel : IVehcileViewModel {}


ObjectFactory.configure(x => x.ForRequestedType<IVehicleViewModel>()
.CacheBy(InstanceScope.Singleton)
.TheDefault.Is
.OfConcreteType<VehicleViewModel>());

The error is happening in the ObjectFactory.configure method. Please
help.

Jeremy D. Miller

unread,
May 11, 2009, 1:14:29 PM5/11/09
to structure...@googlegroups.com
Does VehicleViewModel have a public constructor?
 
Jeremy D. Miller
The Shade Tree Developer
jeremy...@yahoo.com



From: Andrew <awil...@gmail.com>
To: structuremap-users <structure...@googlegroups.com>
Sent: Monday, May 11, 2009 11:28:23 AM
Subject: [sm-users] StructureMap configuration failures Error 104

Andrew

unread,
May 12, 2009, 7:47:01 AM5/12/09
to structuremap-users
Yup that was it. I spent a lot of time on this pulling my hair out. I
can't believe I didn't see that. Thanks a bunch.

On May 11, 12:14 pm, "Jeremy D. Miller" <jeremydmil...@yahoo.com>
wrote:
> Does VehicleViewModel have a public constructor?
>
>  Jeremy D. Miller
> The Shade Tree Developer
> jeremydmil...@yahoo.com
>
> ________________________________
> From: Andrew <awili...@gmail.com>
Reply all
Reply to author
Forward
0 new messages