Build Failed - Cannot deserialize
ajhartley
Posts: 3
My project is failing to build in SmartAssembly, giving the error:
Build Failed
The build process failed during the preparation of the resulting assembly.
Cannot deserialize object of type 'System.Collections.Generic.List`1Pacific.Core.Descriptor.BaseObjectDescriptor, Interface, Version=2.0.4217.26108, Culture=neutral, PublicKeyToken=9bb46428258d97e6, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089': Object of type 'Type1c2374e4de494253bfb10315d5c66a03[]' cannot be converted to type 'Pacific.Core.Descriptor.BaseObjectDescriptor[]'.
The smart assembly configuration only has error reporting enabled, we do not use obfuscation or dependency merging. The build was working as part of our TFS build process, but just stopped working on one particular changeset. Weirdly, that changeset did not touch the file complained about here!
Build Failed
The build process failed during the preparation of the resulting assembly.
Cannot deserialize object of type 'System.Collections.Generic.List`1Pacific.Core.Descriptor.BaseObjectDescriptor, Interface, Version=2.0.4217.26108, Culture=neutral, PublicKeyToken=9bb46428258d97e6, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089': Object of type 'Type1c2374e4de494253bfb10315d5c66a03[]' cannot be converted to type 'Pacific.Core.Descriptor.BaseObjectDescriptor[]'.
The smart assembly configuration only has error reporting enabled, we do not use obfuscation or dependency merging. The build was working as part of our TFS build process, but just stopped working on one particular changeset. Weirdly, that changeset did not touch the file complained about here!
Comments
After putting the assembly where SmartAssembly could find it, we got an error about a failure to deserialize because the target runtime was newer than the one loaded into the AppDomain created to do the operation.
As a workaround, there is an undocumented switch you can use in the SmartAssembly project file.