Azure ADO共享查询迁移报错:找不到指定端点[sourceName]
问题背景
我使用带有SourceName和TargetName参数的TfsSharedQueryProcessorOptions查询迁移示例配置时,触发报错:
There is no endpoint named [sourceName]
先后尝试了以下操作,但都没能解决问题:
- 修改现有
Endpoints节点的端点名称 - 在
TfsSharedQueryProcessorOptions内添加新的子Endpoints节点 - 将
TfsEndpoints重命名为TfSharedQueryEndpoints
可行解决方案
正确的配置逻辑是:SourceName和TargetName必须与配置文件根节点下TfsEndpoints内定义的端点名称完全一致,且TfsSharedQueryProcessorOptions不需要单独嵌套Endpoints节点,直接引用全局定义的端点名称即可。
正确配置示例
<!-- 全局端点配置,放在根节点下 --> <TfsEndpoints> <TfsEndpoint Name="SourceEndpoint" Url="http://source-tfs-server:8080/tfs/Collection" ... /> <TfsEndpoint Name="TargetEndpoint" Url="http://target-tfs-server:8080/tfs/Collection" ... /> </TfsEndpoints> <!-- 查询迁移处理器配置,直接引用全局端点名称 --> <TfsSharedQueryProcessorOptions SourceName="SourceEndpoint" TargetName="TargetEndpoint" QueryFolderPath="Shared Queries/MyQueries" ... />
注意事项
- 端点名称区分大小写,必须与全局配置的
Name属性完全匹配 - 不要在
TfsSharedQueryProcessorOptions内部重复定义Endpoints节点,全局的TfsEndpoints会被自动识别
内容的提问来源于stack exchange,提问作者Dual Horizon
相关产品推荐
相关产品推荐

