Error TF249051 using TFS 2008, VS 2012 and Windows 8

穿精又带淫゛_ 提交于 2019-12-12 03:41:34

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/22374438/error-tf249051-using-tfs-2008-vs-2012-and-windows-8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!