WCF InvalidCastException - "from in the context ['Default' | 'LoadFrom'] at location"
-
hello - any idea on this sort of exception?
+ [System.InvalidCastException] {" [A]MyLib.SomeAccount cannot be cast to [B]MyLib.SomeAccount. Type A originates from in the context 'Default' at location 'Y:\\MySrcCode\\FolderA\\Debug\\MyAcct.dll'. Type B originates from 'MyLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' in the context 'LoadFrom' at location 'Y:\\MySrcCode\\FolderB\\Debug\\MyAcct.dll'."} System.InvalidCastException
Note, class exactly the same... but folder different ... how to resolve...? This may be hint but...[^] Another hint here[^] -
hello - any idea on this sort of exception?
+ [System.InvalidCastException] {" [A]MyLib.SomeAccount cannot be cast to [B]MyLib.SomeAccount. Type A originates from in the context 'Default' at location 'Y:\\MySrcCode\\FolderA\\Debug\\MyAcct.dll'. Type B originates from 'MyLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' in the context 'LoadFrom' at location 'Y:\\MySrcCode\\FolderB\\Debug\\MyAcct.dll'."} System.InvalidCastException
Note, class exactly the same... but folder different ... how to resolve...? This may be hint but...[^] Another hint here[^] -
hello - any idea on this sort of exception?
+ [System.InvalidCastException] {" [A]MyLib.SomeAccount cannot be cast to [B]MyLib.SomeAccount. Type A originates from in the context 'Default' at location 'Y:\\MySrcCode\\FolderA\\Debug\\MyAcct.dll'. Type B originates from 'MyLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' in the context 'LoadFrom' at location 'Y:\\MySrcCode\\FolderB\\Debug\\MyAcct.dll'."} System.InvalidCastException
Note, class exactly the same... but folder different ... how to resolve...? This may be hint but...[^] Another hint here[^]Use the WCF forum for WCF questions.
.45 ACP - because shooting twice is just silly
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001 -
hello - any idea on this sort of exception?
+ [System.InvalidCastException] {" [A]MyLib.SomeAccount cannot be cast to [B]MyLib.SomeAccount. Type A originates from in the context 'Default' at location 'Y:\\MySrcCode\\FolderA\\Debug\\MyAcct.dll'. Type B originates from 'MyLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' in the context 'LoadFrom' at location 'Y:\\MySrcCode\\FolderB\\Debug\\MyAcct.dll'."} System.InvalidCastException
Note, class exactly the same... but folder different ... how to resolve...? This may be hint but...[^] Another hint here[^]Here's a common way that the problem can be reproduced: How to reproduce InvalidCastException when binding to an assembly in the LoadFrom context