My winforms application has a custom control, one of its property "LayoutStream" is byte[]
type and it is serializable property. Currently I have ported my application from 4.6 framework to NetCore 3.0 project.
While run ported NetCore 3.0 project, im getting below exception when deserialize the data from resx file.
this.control1.LayoutStream = ((SerializableByteList)(resources.GetObject("control1.LayoutStream")));
public SerializableByteList LayoutStream
{
get
{
return LayoutStream;
}
set
{
LayoutStream= value;
if (value != null)
this.stmLayout.Write(value.Bytes.ToArray(), 0, value.Bytes.ToArray().Length);
}
}
[Serializable]
public class SerializableByteList
{
public SerializableByteList()
{
Bytes = new List<byte>();
}
public List<byte> Bytes { get; set; }
}
Exception Occurs: Exception thrown: 'System.Runtime.Serialization.SerializationException' in System.Runtime.Serialization.Formatters.dll An unhandled exception of type 'System.Runtime.Serialization.SerializationException' occurred in System.Runtime.Serialization.Formatters.dll Unable to find assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
Please suggest solution to resolve this.