2016-07-24 131 views
4

我爲TFS 2015開發了一個插件(擴展)。
插件實際上是一個自定義構建任務,可以作爲構建過程中的一個步驟添加。運行TFS 2015自定義構建任務時出現異常

的問題是,當我開發我的插件我用TFS 2015年更新2.1,但我的用戶更新2.0工作,他們看到詢問用戶的過程中,插件開始運行後不久,這個奇怪的錯誤投入。

當執行這一行:發生

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

此錯誤:

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更改日誌中的任何內容,這意味着與我的錯誤相關的任何錯誤修復。

我錯過了什麼?

+0

你的擴展是一個跨平臺的構建任務嗎? –

+0

我不確定你的意思。我寫了一個基於Javascript的插件(在Node上運行)來觸發一些API。我猜測它可以被稱爲跨平臺,但我不確定微軟在跨平臺中究竟意味着什麼。 – Rivi

+0

我試圖說你的擴展是否具有跨平臺的構建任務。跨平臺構建任務意味着此任務可用於多種平臺,如Windows,OSX或Linux。 –

回答