运行TFS 2015自定义生成任务时出现异常 [英] Exception when running TFS 2015 custom build task

查看:52
本文介绍了运行TFS 2015自定义生成任务时出现异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为TFS 2015开发了一个插件(扩展)。

插件实际上是一个自定义构建任务,可以作为构建过程中的一个步骤添加。


问题是,当我开发我的插件时,我使用了TFS 2015更新2.1,但我的用户使用更新2.0,他们在插件开始运行过程中不久看到这个奇怪的错误要求用户输入。



执行此行时:

I have developed a plugin (extension) for TFS 2015.
The plugin is actually a custom build task that can be added as a step in the build process.

The problem is that when I developed my plugin I used TFS 2015 update 2.1 but my users work with update 2.0 and they see this strange error shortly after the plugin starts running during the process of asking for the user inputs.

When this line is executed:

var build = tl.getInput(MyConstants.SomeInput, true);  




发生此错误:

This error occurs:

17:46:13.932774 Process logging event with task handler. 17:46:13.932774
---------------------------------------------------------------------------
17:46:13.932774 System.FormatException: Input string was not in a correct format.

17:46:13.932774    at System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args)

17:46:13.932774    at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)

17:46:13.932774    at System.String.Format(IFormatProvider provider, String format, Object[] args)

17:46:13.932774    at Microsoft.TeamFoundation.DistributedTask.Agent.Worker.Common.BaseContext.LogMessageWithDecoration(LoggingVerbosity verbosity, String decoration, String message, Object[] args) 17:46:13.932774    at System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args)

17:46:13.932774    at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)

17:46:13.932774    at System.String.Format(IFormatProvider provider, String format, Object[] args)

17:46:13.932774    at Microsoft.TeamFoundation.DistributedTask.Agent.Worker.Common.BaseContext.LogMessageWithDecoration(LoggingVerbosity verbosity, String decoration, String message, Object[] args) 17:46:13.932774
---------------------------------------------------------------------------



我能够重现此错误并且存在仅在更新2.0中,在更新到2.1之后消失。我已经搜索但是在更新2.1更改日志中没有看到任何内容,这意味着任何与我的错误相关的错误修复。



我缺少什么?


I was able to reproduce this error and it exists only in update 2.0 and gone after I updated to 2.1. I have searched but didn't see anything in the update 2.1 change log that implies any bug fix related to my error.

What am I missing?

推荐答案

您好DeddyDadon,

Hi DeddyDadon,

自定义构建任务的详细代码是什么?

What’s the detail code of custom build task?

根据TFS 2015更新2.1修复的错误,它没有提到与您的问题相关的错误,但可能有一些更改可以解决您的问题。

Based on TFS 2015 update 2.1 fixed bugs, it doesn’t mention the bug related to your issue, but maybe something changes fix your issue.

问候

Starain


这篇关于运行TFS 2015自定义生成任务时出现异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆