本文介绍了“Microsoft.TeamFoundation.Build.Workflow.Activities.BuildSettings"类型的表达式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在 TFS2013 中创建自定义活动,一旦构建应用程序,我就会遇到以下问题:

I'm creating Custom Activities in TFS2013 and i'm hitting below issue once build application:

    An error occurred while initializing a build for build definition \TestApp\TestApp.Main.CI: 
Exception Message: Expression of type 'Microsoft.TeamFoundation.Build.Workflow.Activities.BuildSettings' cannot be used for return type 'Microsoft.TeamFoundation.Build.Workflow.Activities.BuildSettings' (type ArgumentException)
Exception Stack Trace:    at System.Linq.Expressions.Expression.ValidateLambdaArgs(Type delegateType, Expression& body, ReadOnlyCollection`1 parameters)
   at System.Linq.Expressions.Expression.LambdaTDelegate
   at System.Linq.Expressions.Expression.LambdaTDelegate
   at Microsoft.VisualBasic.Activities.VisualBasicHelper.CompileT
   at Microsoft.VisualBasic.Activities.VisualBasicHelper.CompileT
   at Microsoft.VisualBasic.Activities.VisualBasicHelper.CompileT
   at Microsoft.VisualBasic.Activities.VisualBasicValue`1.CacheMetadata(CodeActivityMetadata metadata)
   at System.Activities.CodeActivity`1.OnInternalCacheMetadataExceptResult(Boolean createEmptyBindings)
   at System.Activities.Activity`1.OnInternalCacheMetadata(Boolean createEmptyBindings)
   at System.Activities.Activity.InternalCacheMetadata(Boolean createEmptyBindings, IList`1& validationErrors)
   at System.Activities.ActivityUtilities.ProcessActivity(ChildActivity childActivity, ChildActivity& nextActivity, Stack`1& activitiesRemaining, ActivityCallStack parentChain, IList`1& validationErrors, ProcessActivityTreeOptions options, ProcessActivityCallback callback)
   at System.Activities.ActivityUtilities.ProcessActivityTreeCore(ChildActivity currentActivity, ActivityCallStack parentChain, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList`1& validationErrors)
   at System.Activities.ActivityUtilities.CacheRootMetadata(Activity activity, LocationReferenceEnvironment hostEnvironment, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList`1& validationErrors)
   at System.Activities.Validation.ActivityValidationServices.InternalActivityValidationServices.InternalValidate()
   at Microsoft.TeamFoundation.Build.Workflow.WorkflowHelpers.ValidateWorkflow(Activity activity, ValidationSettings validationSettings)
   at Microsoft.TeamFoundation.Build.Hosting.BuildProcessCache.LoadFromXaml(String workflowXaml, TextExpressionImports textExpressionImports)
   at Microsoft.TeamFoundation.Build.Hosting.BuildControllerWorkflowManager.PrepareRequestForBuild(WorkflowManagerActivity activity, IBuildDetail build, WorkflowRequest request, IDictionary`2 dataContext)
   at Microsoft.TeamFoundation.Build.Hosting.BuildWorkflowManager.TryStartWorkflow(WorkflowRequest request, WorkflowManagerActivity activity, BuildWorkflowInstance& workflowInstance, Exception& error, Boolean& syncLockTaken)

你有什么想法吗?谢谢!

Do you have any ideas? Thank you!

推荐答案

我尝试删除 Custom Assembly 文件夹中与 Microsoft.TeamFoundation.* 相关的所有 dll 并重新启动服务 => 有效!

I tried to delete all dlls related to Microsoft.TeamFoundation.* in Custom Assembly folder and restart the services => It works!

这篇关于“Microsoft.TeamFoundation.Build.Workflow.Activities.BuildSettings"类型的表达式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-26 20:28