Closed CFY2436 closed 1 year ago
IKVM.MSBuild.Tasks.IkvmTaskMessageException can be thrown from the custom task. However, it needs to cross an AppDomain boundary on .NET Framework, and thus needs to be serializable.
This serialization problem should be fixed in the 8.6.3-pre.11 release building now.
大佬,在VS引用,运行时报错咯 UNHANDLED EXCEPTIONS FROM PROCESS 28032:
2023/7/21 14:43:08 System.Runtime.Serialization.SerializationException: 程序集“IKVM.MSBuild.Tasks, Version=8.6.2.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58”中的类型“IKVM.MSBuild.Tasks.IkvmTaskMessageException”未标记为可序列化。 在 System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder) 在 System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder) 在 System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck) 在 System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck) 在 Microsoft.Build.BackEnd.BinaryTranslator.BinaryWriteTranslator.TranslateDotNet[T](T& value) 在 Microsoft.Build.BackEnd.TaskHostTaskComplete.Translate(ITranslator translator) 在 Microsoft.Build.BackEnd.NodeEndpointOutOfProcBase.RunReadLoop(Stream localReadPipe, Stream localWritePipe, ConcurrentQueue`1 localPacketQueue, AutoResetEvent localPacketAvailable, AutoResetEvent localTerminatePacketPump)