严重性代码描述项目文件行抑制状态 错误MSB4018“ XamlCTask”任务意外失败。 System.Runtime.Serialization.SerializationException:程序集“ Xamarin.Forms.Core,版本= 2.0.0.0,Culture = neutral,PublicKeyToken = null”中的类型“ Xamarin.Forms.Xaml.XamlParseException”未标记为可序列化。
服务器堆栈跟踪: 在System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj,ISurrogateSelector surrogateSelector,StreamingContext上下文,SerObjectInfoInit serObjectInfoInit,IFormatterConverter转换器,ObjectWriter objectWriter,SerializationBinder绑定程序) 在System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize处(Object obj,ISurrogateSelector surrogateSelector,StreamingContext上下文,SerObjectInfoInit serObjectInfoInit,IFormatterConverter转换器,ObjectWriter objectWriter,SerializationBinder绑定器) 在System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize处(对象图,Header [] inHeaders,__ BinaryWriter serWriter,布尔值fCheck) 在System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize处(流序列化流,对象图,Header []标头,布尔值fCheck) 在System.Runtime.Remoting.Channels.CrossAppDomainSerializer.SerializeMessageParts(ArrayList argsToSerialize) 在System.Runtime.Remoting.Messaging.SmuggledMethodReturnMessage..ctor(IMethodReturnMessage mrm) 在System.Runtime.Remoting.Messaging.SmuggledMethodReturnMessage.SmuggleIfPossible(IMessage消息) 在System.Runtime.Remoting.Channels.CrossAppDomainSink.DoDispatch(Byte [] reqStmBuff,SmuggledMethodCallMessage smuggledMcm,SmuggledMethodReturnMessage&smuggledMrm) 在System.Runtime.Remoting.Channels.CrossAppDomainSink.DoTransitionDispatchCallback(Object [] args)
异常重新抛出为[0]: 在System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg,IMessage retMsg) 在System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&msgData,Int32类型) 在Microsoft.Build.Framework.ITask.Execute() 在Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() 在Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() C:\ Users \ bgogia.nuget \ packages \ xamarin.forms \ 3.1.0.697729 \ build \ netstandard2.0 \ Xamarin.Forms.targets 104
xamarin.forms版本是nuget的最新版本 干净的解决方案,删除bin / obj,重新启动IDE,但没有解决方法