Buenas gente,

 

Estaba usado en una aplicacion EntityFramework 5.

La versión que tenia de la dll es la 4.0 … aunque aparecia como EF CTP 5.

El problema lo tengo en una aplicación de consola compilada con el FX4.

 

A partir de hoy dejo de andar el EF.

Me paso hasta ahora en dos maquinas Windows 7 que tienen instalado FX4 y
FX4.5 .

Posiblemente sea algun automatic update, pero si me pongo desinstalarlos, no
estoy seguro de que mi maquina siga siendo la misma.

El problema que tengo, veo que se soluciona con la dll de EF de version 4.4
… pero me va a obligar a retestear toda la aplicación ese cambio.

 

Les paso el error, a lo mejor a alguno le ocurrio algo parecido y tiene
alguna idea que no sea migrar de version de EF.

Algo mas, el error se dispara al crear la instancia del context.

 

Gracias!

 

System.TypeInitializationException: 

The type initializer for
'System.Data.Entity.ModelConfiguration.Utilities.TypeExtensions' threw an
exception. 

---> System.ArgumentException: An item with the same key has already been
added.

   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)

   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value,
Boolean add)

   at
System.Data.Entity.ModelConfiguration.Utilities.TypeExtensions..cctor()

   --- End of inner exception stack trace ---

   at
System.Data.Entity.ModelConfiguration.Utilities.TypeExtensions.IsValidStruct
uralType(Type type)

   at System.Data.Entity.Internal.DbSetDiscoveryService.GetSets()

   at System.Data.Entity.Internal.DbSetDiscoveryService.InitializeSets()

   at System.Data.Entity.DbContext..ctor(DbConnection existingConnection,
Boolean contextOwnsConnection)

   at Itx.UofR.Health.Core.Model.HealthContext..ctor(DbConnection
existingConnection, Boolean contextOwnsConnection) in
Z:\itx\ursonbiometric-www\trunk\Dev\Itx.

UofR.Health\Itx.UofR.Health.Core\Model\ef\HealthModel.Context.cs:line 22

   at Itx.UofR.Health.Core.Data.DalCtx..ctor() in
Z:\itx\ursonbiometric-www\trunk\Dev\Itx.UofR.Health\Itx.UofR.Health.Core\Dat
a\DalCtx.cs:line 60

   at Itx.UofR.Health.Core.Util.CoreCtx.get_DalCtxIntancePerRequest() in
Z:\itx\ursonbiometric-www\trunk\Dev\Itx.UofR.Health\Itx.UofR.Health.Core\Uti
l\CoreCtx.cs:line 187

   at Itx.UofR.Health.Core.Data.DalCtx.get_Instance() in
Z:\itx\ursonbiometric-www\trunk\Dev\Itx.UofR.Health\Itx.UofR.Health.Core\Dat
a\DalCtx.cs:line 69

   at Itx.UofR.Health.Core.Services.SecuritySvc.GetUserById(Int32 id) in
Z:\itx\ursonbiometric-www\trunk\Dev\Itx.UofR.Health\Itx.UofR.Health.Core\Ser
vices\SecuritySvc.cs:line 28

   at
Itx.UofR.Health.Core.Services.BiometricSvc.GetClientCurrentBiometricResults(
Int32 userId) in
Z:\itx\ursonbiometric-www\trunk\Dev\Itx.UofR.Health\Itx.UofR.Health.Core\Ser
vices\BiometricSvc.cs:line 24

   at Itx.UofR.Health.CmsUI.PhaView.GetBiometricSectionHtml(Int32 userId) in
Z:\itx\ursonbiometric-www\trunk\Dev\Itx.UofR.Health\Itx.UofR.Health.CmsUI\Ph
aView\PhaView.ascx.cs:line 150

   at Itx.UofR.Health.CmsUI.PhaView.GetSurveySectionHtml(Int32
sectionNumber, Int32 userId) in
Z:\itx\ursonbiometric-www\trunk\Dev\Itx.UofR.Health\Itx.UofR.Health.CmsUI\Ph
aView\PhaView.ascx.cs:line 140

   at TestCore.Program.SurveyView() in
Z:\itx\ursonbiometric-www\trunk\Dev\Itx.UofR.Health\Itx.UofR.Health.Test\Pro
gram.cs:line 66

   at TestCore.Program.Main(String[] args) in
Z:\itx\ursonbiometric-www\trunk\Dev\Itx.UofR.Health\Itx.UofR.Health.Test\Pro
gram.cs:line 28

 

 

 

 

Responder a