none
Linq IndexOutOfRangeException Windows XP Vista .Net 3.5 RRS feed

  • 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.

    quarta-feira, 20 de julho de 2011 18:24

Respostas

Todas as Respostas