Udostępnij za pośrednictwem


使用 TFS 2015 with Update 2 組建程式失敗

環境 : Windows 2012 R2 中文版 + TFS 2015 with Update 2 中文版.

使用一個 ASP.NET  project 簽入到 Git Repository  後設定組建, 出 現 錯誤訊息:

BuildFailed

 

錯誤訊息:

  1. 2016-04-26T23:36:12.2618186Z ##[error]傳入了無效的物件,必須有 ':' 或 '}'。 (609): {
  2. 2016-04-26T23:36:12.2628188Z ##[error] "loc.messages.PSLIB_ContainerPathNotFound0": "?曆??啣捆?刻楝敺? '{0}'",
  3. 2016-04-26T23:36:12.2648187Z ##[error] "loc.messages.PSLIB_EndpointAuth0": "'{0}' ??蝡舫?隤?",
  4. 2016-04-26T23:36:12.2648187Z ##[error] "loc.messages.PSLIB_EndpointUrl0": "'{0}' ??蝡舫? URL",
  5. 2016-04-26T23:36:12.2658180Z ##[error] "loc.messages.PSLIB_EnumeratingSubdirectoriesFailedForPath0": "?箄楝敺????桅?憭望?: '{0}'",
  6. 2016-04-26T23:36:12.2658180Z ##[error] "loc.messages.PSLIB_FileNotFound0": "?曆??唳?獢? '{0}'",
  7. 2016-04-26T23:36:12.2658180Z ##[error] "loc.messages.PSLIB_Input0": "'{0}' 頛詨",
  8. 2016-04-26T23:36:12.2668190Z ##[error] "loc.messages.PSLIB_InvalidPattern0": "璅∪??⊥?: '{0}'",
  9. 2016-04-26T23:36:12.2678187Z ##[error] "loc.messages.PSLIB_LeafPathNotFound0": "?曆??啣??楝敺? '{0}'",
  • 2016-04-26T23:36:12.2678187Z ##[error] "loc.messages.PSLIB_PathLengthNotReturnedFor0": "頝臬?甇????撅?憭望??ernel32 摮頂蝯望?喳? '{0}' ?楝敺摨?,
  • 2016-04-26T23:36:12.2678187Z ##[error] "loc.messages.PSLIB_PathNotFound0": "?曆??啗楝敺? '{0}'",
  • 2016-04-26T23:36:12.2688189Z ##[error] "loc.messages.PSLIB_Process0ExitedWithCode1": "??摨?'{0}' 隞亥??Ⅳ '{1}' 蝯???,
  • 2016-04-26T23:36:12.2688189Z ##[error] "loc.messages.PSLIB_Required0": "敹??? {0}",
  • 2016-04-26T23:36:12.2698203Z ##[error] "loc.messages.PSLIB_StringFormatFailed": "摮葡?澆?憭望???,
  • 2016-04-26T23:36:12.2698203Z ##[error] "loc.messages.PSLIB_StringResourceKeyNotFound0": "?曆??啣?銝脰?皞揣撘: '{0}'",
  • 2016-04-26T23:36:12.2708188Z ##[error] "loc.messages.PSLIB_TaskVariable0": "'{0}' 撌乩?霈"
  • 2016-04-26T23:36:12.2708188Z ##[error]}
  • 2016-04-26T23:36:12.2708188Z ##[error]您必須為 Get-Member Cmdlet 指定一個物件。
  • 2016-04-26T23:36:12.3488194Z ##[error]傳入了無效的物件,必須有 ':' 或 '}'。 (199): {
  • 2016-04-26T23:36:12.3498193Z ##[error] "loc.friendlyName": "Visual Studio 蝯遣",
  • 2016-04-26T23:36:12.3508198Z ##[error] "loc.helpMarkDown": "[閰喟敦鞈?](https://go.microsoft.com/fwlink/?LinkID=613727)",
  • 2016-04-26T23:36:12.3508198Z ##[error] "loc.description": "雿輻 MSBuild 撱箇蔭銝西身摰?Visual Studio ?撅祆€?,
  • 2016-04-26T23:36:12.3518194Z ##[error] "loc.instanceNameFormat": "撱箇蔭?寞? $(solution)",
  • 2016-04-26T23:36:12.3518194Z ##[error] "loc.group.displayName.advanced": "?脤?",
  • 2016-04-26T23:36:12.3518194Z ##[error] "loc.input.label.solution": "?寞?",
  • 2016-04-26T23:36:12.3528198Z ##[error] "loc.input.help.solution": "閬銵??寞???MSBuild 撠?銋摮??嗆頝臬??撠楝敺€雿輻?祉摮???憒?`**\\*.sln` ?喲?冽?€??鞈?憭曆葉????sln 瑼???,
  • 2016-04-26T23:36:12.3548197Z ##[error] "loc.input.label.msbuildArgs": "MSBuild 撘",
  • 2016-04-26T23:36:12.3558191Z ##[error] "loc.input.help.msbuildArgs": "?喲???MSBuild ??憭??詻€?,
  • 2016-04-26T23:36:12.3558191Z ##[error] "loc.input.label.platform": "撟喳",
  • 2016-04-26T23:36:12.3568194Z ##[error] "loc.input.label.configuration": "蝯?",
  • 2016-04-26T23:36:12.3568194Z ##[error] "loc.input.label.clean": "皜",
  • 2016-04-26T23:36:12.3568194Z ##[error] "loc.input.label.restoreNugetPackages": "?? NuGet 憟辣",
  • 2016-04-26T23:36:12.3578192Z ##[error] "loc.input.label.vsVersion": "Visual Studio ?",
  • 2016-04-26T23:36:12.3578192Z ##[error] "loc.input.help.vsVersion": "?交銝???嚗???冽??賣?啁??€?啁??研€?,
  • 2016-04-26T23:36:12.3578192Z ##[error] "loc.input.label.msbuildArchitecture": "MSBuild ?嗆?",
  • 2016-04-26T23:36:12.3588187Z ##[error] "loc.input.help.msbuildArchitecture": "?豢??批?? MSBuild ?瑽?(x86?64) 隞亙銵€?,
  • 2016-04-26T23:36:12.3588187Z ##[error] "loc.input.label.logProjectEvents": "閮?撠?閰喟敦鞈?",
  • 2016-04-26T23:36:12.3628187Z ##[error] "loc.messages.MSBuildLocationDeprecated0": "撌脣?隞?MSBuild 雿蔭??蕭?亙€?'{0}'",
  • 2016-04-26T23:36:12.3628187Z ##[error] "loc.messages.MSBuildNotFoundVersion0Architecture1": "?曆??啁??祉 '{0}' 銝瑽 '{1}' ??MSBuild??,
  • 2016-04-26T23:36:12.3638188Z ##[error] "loc.messages.MSBuildVersionDeprecated0": "撌脣?隞?MSBuild ???蕭?亙€?'{0}'??,
  • 2016-04-26T23:36:12.3638188Z ##[error] "loc.messages.UnexpectedVSVersion0": "?芷??? Visual Studio ? '{0}'??,
  • 2016-04-26T23:36:12.3638188Z ##[error] "loc.messages.VSLocationDeprecated0": "撌脣?隞?Visual Studio 雿蔭??蕭?亙€?'{0}'",
  • 2016-04-26T23:36:12.3648186Z ##[error] "loc.messages.VSNotFoundTry": "?曆???Visual Studio???岫摰??舀??Visual Studio ????撌乩?摰儔隞亙?敺?渡??祆??柴€?,
  • 2016-04-26T23:36:12.3648186Z ##[error] "loc.messages.VSVersion0NotFoundLookingForLatest": "?曆???Visual Studio ? '{0}'?迤?典??暹??啁??研€?

2016-04-26T23:36:12.3648186Z

 

解決的方式:

在 Agent 安裝的目錄下找到 LocalizationFunctions.ps1 , 將 2 個 Get-Content 指令 的 Encodeing  指定為 UTF8

01 02 03

HTH.