Silverlight project build error 'An item with the same key has already been added'


  • Hi All

    I have Silverlight project.
    I have ClassLibrary project that contain Entity Framework Model and generated DomainService.
    When I add this project in my silverlight project property as WCF RIA service, build return error 'An item with the same key has already been added'

    I think it's happen when generated DomainContext in Silverlight project.

    please help me, how can I solve this problem.
    Wednesday, May 02, 2012 4:30 AM


  • Hi All

    Thank's You for your responce.

    I finde solution for my task.

    I my project I try to add inheritance between 2 EF model contexts.

    When I create for this models Domain Service and Build Silverlight project it's return error.

    Silverlight project can't generate domain context for my domain servicies.

    In my DB's tables FK names is same.

    I replace forign key names in my DB's and regenerate EF model.

    After that it's builded corectly.

    This is very usefull.

    Thank's You mery much.

    Thursday, May 03, 2012 4:45 AM

All replies