InvalidOperationException - The type ObservableCollection`1 has multiple constructors of length 1. Unable to disambiguate.

Jun 3 at 3:34 PM
Edited Jun 3 at 3:34 PM
I'm currently getting 'InvalidOperationException - The type ObservableCollection`1 has multiple constructors of length 1. Unable to disambiguate.'

I want Unity to use the default constructor. How can I get it to do that?

I'm using XML to configure it.

Currently, I have:
    <container>
      <register type="ObservableCollection[EntryDetails]"
                mapTo="ObservableCollection[EntryDetails]" />
    </container>
and I'm using
container.Resolve<ObservableCollection<EntryDetails>>();
Background: the code is used in two situations that use different .config files. In the other situation, there is a subclass of ObservableCollection which only implments a default constructor, so that works okay.

I know container.Resolve is often frowned-upon but I just need to get this working: time is pressing and a rewrite is not an option.
Editor
Jun 3 at 4:07 PM
Change the configuration to:
    <container>
      <register type="ObservableCollection[EntryDetails]"
                mapTo="ObservableCollection[EntryDetails]">
        <constructor />
      </register>
    </container>
That tells Unity to use the default constructor (constructor with no params).

~~
Randy Levy
entlib.support@live.com
Enterprise Library support engineer
Support How-to
Jun 4 at 7:34 AM
Thanks very much for solving that for me.