Usuário com melhor resposta
Linq IndexOutOfRangeException Windows XP Vista .Net 3.5

Pergunta
-
In some cases in my application the Dll System.Data.Linq generates an exception when running in Windows XP or Vista, but doesn't in Windows 7. Considering both systems were up to date.
The exception is:
System.IndexOutOfRangeException: Index was outside the bounds of the array. at System.Data.Linq.IdentityManager.StandardIdentityManager.MultiKeyManager`3.TryCreateKeyFromValues(Object[] values, MultiKey`2& k) at System.Data.Linq.IdentityManager.StandardIdentityManager.IdentityCache`2.Find(Object[] keyValues) at System.Data.Linq.IdentityManager.StandardIdentityManager.Find(MetaType type, Object[] keyValues) at System.Data.Linq.CommonDataServices.GetCachedObject(MetaType type, Object[] keyValues) at System.Data.Linq.ChangeProcessor.GetOtherItem(MetaAssociation assoc, Object instance) at System.Data.Linq.ChangeProcessor.BuildEdgeMaps() at System.Data.Linq.ChangeProcessor.SubmitChanges(ConflictMode failureMode) at System.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode) --- End of inner exception stack trace ---
My workaround was to remove the Dll System.Data.Linq(version 3.5.30729.1) and install the one from Windows 7(version 3.5.30729.4926) it seemed to work fine.But when installing my software, by setup installation, in a System running Windows XP or Vista I just can't uninstall and reinstall a Dll from GAC(that is related to framework).
Can anyone give me another workaround for this or a real solution?
Thanks in advance.
Respostas
-
Igor, you made some changes in the database and don't reflect in the model ? take a look at this thread http://stackoverflow.com/questions/86685/debugging-linq-to-sql-submitchanges#89744
Olavo Oliveira Neto
http://olavooneto.wordpress.com
Se for útil marque como resposta e faça um Developer feliz :)- Sugerido como Resposta AndreAlvesLimaModerator quarta-feira, 27 de julho de 2011 01:41
- Marcado como Resposta AndreAlvesLimaModerator segunda-feira, 8 de agosto de 2011 16:42
Todas as Respostas
-
Igor, you made some changes in the database and don't reflect in the model ? take a look at this thread http://stackoverflow.com/questions/86685/debugging-linq-to-sql-submitchanges#89744
Olavo Oliveira Neto
http://olavooneto.wordpress.com
Se for útil marque como resposta e faça um Developer feliz :)- Sugerido como Resposta AndreAlvesLimaModerator quarta-feira, 27 de julho de 2011 01:41
- Marcado como Resposta AndreAlvesLimaModerator segunda-feira, 8 de agosto de 2011 16:42
-
Srs.,
Por favor, pedimos para que sejam postadas somente threads em português nos fóruns MSDN em PT-BR...
Obrigado pelo apoio...
André Alves de Lima
Microsoft MVP - Client App Dev
Visite o meu site: http://www.andrealveslima.com.br
Me siga no Twitter: @andrealveslima -
-
Para o fórum em inglês utilize a seguinte URL:
http://social.msdn.microsoft.com/Forums/en-us
Aí é só localizar a categoria desejada e fazer a questão...
André Alves de Lima
Microsoft MVP - Client App Dev
Visite o meu site: http://www.andrealveslima.com.br
Me siga no Twitter: @andrealveslima