错误 TF249051 使用 TFS 2008、VS 2012 和 Windows 8 [英] Error TF249051 using TFS 2008, VS 2012 and Windows 8
问题描述
我有一个用于 Visual Studio 的插件,它连接到 TFS 2008 服务器.我在 Windows 7 和 Windows 8(和 8.1)中使用 VS 2012.
使用我的插件、VS 2012 和 Windows 7 没问题.一切正常.
但是在使用 My Addin、VS 2012 和 Windows 8 时存在身份验证问题.无论如何,如果我在 VS 2012 中使用 Team Explorer 和 Source Control,则没有问题.
我收到以下错误:
<块引用>TF249051:找不到对应于以下服务器的 URL名称:myTFS_server.验证服务器名称是否正确.
完整跟踪:
跟踪域名:myTFS_server跟踪 DomainUri:http://myTFS_server:8080/跟踪项目名称:MyTeamProject跟踪 ProjectUri:vstfs:///Classification/TeamProject/5e1c44c0-a88c-4447-b2d3-1e9191abc700源代码管理:System.__ComObject连接到 TFS 时出错:Microsoft.TeamFoundation.TeamFoundationInvalidServerNameException:TF249051:找不到对应于以下服务器名称的 URL:myTFS_server.验证服务器名称是否正确.在 Microsoft.TeamFoundation.Client.TfsConnection.GetFullyQualifiedUriForName(String name, String locationServiceRelativePath, Func`2 getRegisteredUri)在 Microsoft.TeamFoundation.Client.TfsTeamProjectCollection.GetFullyQualifiedUriForName(字符串名称)在 TeamExplorerManager.TFSServer.Connect(String serverName, ICredentialsProvider credentialsProvider)TF249051: 找不到与以下服务器名称对应的 URL:myTFS_server.验证服务器名称是否正确. SourceControl:http://myTFS_server:8080/vstfs:///Classification/TeamProject/5e1c44c0-a88c-4447-b2d3-1e9191abc700.目标 {http://schemas.microsoft.com/developer/msbuild/2003}项目*** 在启动完成时结束 ***
对此有什么建议吗?
My Addin 将不得不使用 bindingRedirect
将所有版本从 v10 重定向到 v11.
例如:
<预><代码><配置><运行时><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><依赖程序集><assemblyIdentity name="Microsoft.VisualStudio.TeamFoundation"publicKeyToken="xxxxxxxxxxxxx"文化=中性"/><bindingRedirect oldVersion="10.0.0.0"newVersion="11.0.0.0"/></dependentAssembly><依赖程序集><assemblyIdentity name="Microsoft.TeamFoundation.Client"publicKeyToken="xxxxxxxxxxxxx"文化=中性"/><bindingRedirect oldVersion="10.0.0.0"newVersion="11.0.0.0"/></dependentAssembly></assemblyBinding></运行时></配置>确保将 publicKeyToken
更新为正确的值.
注意:如果程序集不起作用a href="http://msdn.microsoft.com/en-us/library/h4fa028b.aspx" rel="nofollow noreferrer">强名称签名.
微软几乎可以肯定是强名称签署了他们的程序集.
参考资料:SpecificVersion=False with TFS API dll
I have a Addin for Visual Studio, that connect to TFS 2008 server. I use VS 2012 in Windows 7 and Windows 8 (and 8.1).
No problem using my Addin, VS 2012 and Windows 7. All is OK.
But there is authentication issue using My Addin, VS 2012 and Windows 8. Anyway, if I use Team Explorer and Source Control in VS 2012, there's no problem.
I get the following error:
TF249051: No URL can be found that corresponds to the following server name: myTFS_server. Verify that the server name is correct.
Full trace:
Trace DomainName: myTFS_server
Trace DomainUri: http://myTFS_server:8080/
Trace ProjectName: MyTeamProject
Trace ProjectUri: vstfs:///Classification/TeamProject/5e1c44c0-a88c-4447-b2d3-1e9191abc700
Source Control: System.__ComObject
Error in Connect to TFS: Microsoft.TeamFoundation.TeamFoundationInvalidServerNameException: TF249051: No URL can be found that corresponds to the following server name: myTFS_server. Verify that the server name is correct.
at Microsoft.TeamFoundation.Client.TfsConnection.GetFullyQualifiedUriForName(String name, String locationServiceRelativePath, Func`2 getRegisteredUri)
at Microsoft.TeamFoundation.Client.TfsTeamProjectCollection.GetFullyQualifiedUriForName(String name)
at TeamExplorerManager.TFSServer.Connect(String serverName, ICredentialsProvider credentialsProvider)
TF249051: No URL can be found that corresponds to the following server name: myTFS_server. Verify that the server name is correct.. SourceControl: http://myTFS_server:8080/vstfs:///Classification/TeamProject/5e1c44c0-a88c-4447-b2d3-1e9191abc700.
Targets {http://schemas.microsoft.com/developer/msbuild/2003}Project
*** End OnStartupComplete ***
Any suggestions about it?
My Addin will have to make use of a bindingRedirect
to redirect all versions to from v10 to v11.
For example:
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualStudio.TeamFoundation"
publicKeyToken="xxxxxxxxxxxxx"
culture="neutral" />
<bindingRedirect oldVersion="10.0.0.0"
newVersion="11.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.TeamFoundation.Client"
publicKeyToken="xxxxxxxxxxxxx"
culture="neutral" />
<bindingRedirect oldVersion="10.0.0.0"
newVersion="11.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Make sure to update the publicKeyToken
to the correct value.
Note: Specific version does not work if the assembly is strong name signed.
Microsoft almost certainly strong-name signed their assembly.
References: SpecificVersion=False with TFS API dll's
这篇关于错误 TF249051 使用 TFS 2008、VS 2012 和 Windows 8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!