Reputation: 161
I was trying to migrate tfs to git using git tfs clone
command:
git tfs clone https://locahost/collection $/"Test project/feature-branch"
Error received:
2019-10-31 12:39:56.8412 [Debug] System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> There was an error generating the XML document. ---> Specified cast is not valid. at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.LoadWorkItem(Int32 id, Int32 rev, Nullable
1 asof, IWorkItemRowSets& witem) at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItem..ctor(WorkItemStore store, Uri uri) at Microsoft.TeamFoundation.VersionControl.Client.Changeset.get_WorkItems() at GitTfs.VsCommon.TfsHelperBase.BuildTfsChangeset(Changeset changeset, IGitTfsRemote remote) at GitTfs.VsCommon.TfsHelperBase.<GetChangesets>d__46.MoveNext() at GitTfs.Core.GitTfsRemote.FetchWithMerge(Int32 mergeChangesetId, Boolean stopOnFailMergeCommit, Int32 lastChangesetIdToFetch, IRenameResult renameResult, String[] parentCommitsHashes) at GitTfs.Core.GitTfsRemote.Fetch(Boolean stopOnFailMergeCommit, Int32 lastChangesetIdToFetch, IRenameResult renameResult) at GitTfs.Commands.Fetch.DoFetch(IGitTfsRemote remote, Boolean stopOnFailMergeCommit) at GitTfs.Commands.Fetch.FetchRemote(Boolean stopOnFailMergeCommit, IGitTfsRemote remote) at GitTfs.Commands.Fetch.Run(Boolean stopOnFailMergeCommit, String[] args) at GitTfs.Commands.Fetch.Run() --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
1 args) at GitTfs.GitTfs.Main(GitTfsCommand command, IList
at GitTfs.Util.GitTfsCommandRunner.Run(GitTfsCommand command, IList1 unparsedArgs) at GitTfs.GitTfs.Run(IList
1 args) at GitTfs.Program.Main(String[] args)
Upvotes: 0
Views: 241
Reputation: 59020
It looks like you have a typo:
$/"Test project/feature-branch"
You should wrap the entire source control path in quotation marks: "$/Test project/feature-branch"
Upvotes: 1