【发布时间】:2017-04-06 11:32:26
【问题描述】:
更新到最新的 Xamarin.Forms (2.3.4.224) 后,我不断收到构建错误。有谁知道这可能是什么?
我怀疑这可能与他们在新版本中引入的有关附加属性的新行为更改有关(但我不知道这意味着)
更多信息在这里https://forums.xamarin.com/discussion/92455/xamarin-forms-2-3-4-224
这是我的构建日志
Error The "XamlCTask" task failed unexpectedly.
System.ArgumentException: An item with the same key has already been added.
Server stack trace:
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Xamarin.Forms.Xaml.XamlParser.ParseXamlElementFor(IElementNode node, XmlReader reader)
at Xamarin.Forms.Xaml.XamlParser.ReadNode(XmlReader reader, Boolean nested)
at Xamarin.Forms.Xaml.XamlParser.ParseXamlElementFor(IElementNode node, XmlReader reader)
at Xamarin.Forms.Xaml.XamlParser.ReadNode(XmlReader reader, Boolean nested)
at Xamarin.Forms.Xaml.XamlParser.ParseXamlElementFor(IElementNode node, XmlReader reader)
at Xamarin.Forms.Xaml.XamlParser.ReadNode(XmlReader reader, Boolean nested)
at Xamarin.Forms.Xaml.XamlParser.ParseXamlElementFor(IElementNode node, XmlReader reader)
at Xamarin.Forms.Xaml.XamlParser.ParseXaml(RootNode rootNode, XmlReader reader)
at Xamarin.Forms.Build.Tasks.XamlTask.ParseXaml(Stream stream, TypeReference typeReference)
at Xamarin.Forms.Build.Tasks.XamlCTask.Execute(IList`1& thrownExceptions)
at Xamarin.Forms.Build.Tasks.XamlTask.Execute()
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.Build.Framework.ITask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() Shared
【问题讨论】:
-
你应该发布你的 XAML
-
我的项目中有 50 个 xaml 文件,但不知道哪个有错误
-
我也有同样的问题。你是怎么解决的?
-
无法修复,所以我回滚到以前版本的表单
标签: xamarin xamarin.forms