2014-03-13 50 views
0

我有一个用于Visual Studio的Addin,它连接到TFS 2008服务器。我在Windows 7和Windows 8(和8.1)中使用VS 2012。错误TF249051使用TFS 2008,VS 2012和Windows 8

使用我的Addin,VS 2012和Windows 7没有问题。一切正常。

但是使用My Addin,VS 2012和Windows 8存在身份验证问题。 无论如何,如果我在VS 2012中使用团队资源管理器和源代码管理,那就没有问题了。

我得到以下错误:

TF249051: No URL can be found that corresponds to the following server name: myTFS_server. Verify that the server name is correct.

完全跟踪:

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 *** 

它有什么建议?

回答

0

我的插件将不得不利用bindingRedirect将所有版本重定向到从v10到v11。

例如:

<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> 

确保将publicKeyToken更新到正确的值。

注意: 特定版本does not work如果程序集为strong name signed

微软几乎可以肯定是强名在自己的大会上签了名。

参考文献: SpecificVersion=False with TFS API dll's