发布telerik应用程序

时间:2015-10-05 11:37:58

标签: telerik

我想发布telerik app builder。它显示了这个问题。

构建失败:发生了一个或多个错误.. System.AggregateException:发生一个或多个错误。 ---> System.InvalidOperationException:Sequence包含多个匹配元素    在System.Linq.Enumerable.SingleOrDefault [TSource](IEnumerable 1 source, Func 2谓词)    在Telerik.BlackDragon.Common.Data.TargetResultDataExtensions.GetRelativeOutputPath(TargetResultData targetResultData,DevicePlatform platform)    在Telerik.BlackDragon.Common.Data.TargetResultDataExtensions.GetRelativePathToPackage(TargetResultData targetResultData,DevicePlatform platform)    at System.Linq.Enumerable.ToDictionary [TSource,TKey,TElement](IEnumerable 1 source, Func 2 keySelector,Func 2 elementSelector, IEqualityComparer 1 comparer)    在Telerik.BlackDragon.Client.Build.Services.BuildService.d__2.MoveNext()    ---内部异常堆栈跟踪结束---    在System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)    在System.Threading.Tasks.Task 1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task 1.get_Result()    在Telerik.BlackDragon.Client.Build.CloudBuild.ExecuteCore(IHttpServiceContext httpServiceContext,LogHelper logger)    在Telerik.BlackDragon.Client.Build.CloudTaskBase.ExecuteCore() ---> (内部异常#0)System.InvalidOperationException:Sequence包含多个匹配元素    在System.Linq.Enumerable.SingleOrDefault [TSource](IEnumerable 1 source, Func 2谓词)    在Telerik.BlackDragon.Common.Data.TargetResultDataExtensions.GetRelativeOutputPath(TargetResultData targetResultData,DevicePlatform platform)    在Telerik.BlackDragon.Common.Data.TargetResultDataExtensions.GetRelativePathToPackage(TargetResultData targetResultData,DevicePlatform platform)    at System.Linq.Enumerable.ToDictionary [TSource,TKey,TElement](IEnumerable 1 source, Func 2 keySelector,Func 2 elementSelector, IEqualityComparer 1 comparer)    在Telerik.BlackDragon.Client.Build.Services.BuildService.d__2.MoveNext()

1 个答案:

答案 0 :(得分:0)

这是因为你有这个错误

System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: Sequence contains more than one matching element

这意味着您的linq查询返回多个元素。如果这是正常的,你应该使用FirstOrDefault()

如果存在多个元素,

SingleOrDefault()会抛出异常。