TFS TFS getting sources Error :Please provide a version specification

laofo · 2014年09月01日 · 11 次阅读

[i=s] 本帖最后由 laofo 于 2014-9-1 09:55 编辑

TFS Get sources 出错. 错误信息如下

TFS getting sources Error :Please provide a version specification Microsoft.TeamFoundation.Build.targets (861): Please provide a version specification

Getting sources[color=Red][b] Built C:\Program Files\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets for default targets. C:\Program Files\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets (861): Please provide a version specification. C:\Program Files\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets (861): The "Get" task failed unexpectedly. [/b] Microsoft.TeamFoundation.VersionControl.Client.InvalidVersionSpecException: Please provide a version specification. Server stack trace: at Microsoft.TeamFoundation.VersionControl.Client.VersionSpec.ParseSingleSpec(String versionSpec, String user) at Microsoft.TeamFoundation.Build.Workflow.Activities.TfGet.TfGetCore.RunCommand(VersionControlScope versionControlScope, Workspace workspace, String getting, String nonFatalError, String version, String fileSpec, GetOptions options, RecursionType recursion) at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink) Exception rethrown at [0]: at System.Activities.WorkflowApplication.Invoke(Activity activity, IDictionary2 inputs, WorkflowInstanceExtensionManager extensions, TimeSpan timeout) at System.Activities.WorkflowInvoker.Invoke(Activity workflow, IDictionary2 inputs, TimeSpan timeout, WorkflowInstanceExtensionManager extensions) at Microsoft.TeamFoundation.Build.Tasks.WorkflowTask.ExecuteInternal() at Microsoft.TeamFoundation.Build.Tasks.Task.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult) TF270015: 'MSBuild.exe' returned an unexpected exit code. Expected '0'; actual '1

呃~~这都是啥?生成失败?

恩,是生成失败了,报的 get sources 的错误。

你搞出的问题?修改模板了么? 先上 build 服务器上面手动获取下试试 看看有啥问题不~

是的。还发现有人修改了 TFSBuild.proj 文件,revert 回去就可以了。稍后贴上代码。

有一个 target 是用来获取用户输入的参数。做以下修改就可以了。 这里只适合我们内部的流程。采用 buildNumber 而不是 GetVersion

注释掉了:

需要 登录 后方可回复。