SpecificVersion =假TFS的API的DLL [英] SpecificVersion=False with TFS API dll's

查看:703
本文介绍了SpecificVersion =假TFS的API的DLL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的Web应用程序的大量使用TFS的API。我们开发并与TFS 2010 API DLL的编译它。我们还设置SpecificVersion =假



的问题是,当我们部署到具有TFS 2012,而不是2010 TFS服务器,我们得到以下错误:



无法加载文件或程序集Microsoft.TeamFoundation.Client,版本= 10.0.0.0,......等等。该系统找不到指定的文件。



任何方式migitate呢? TFS 2012安装到GAC和我们说的事实SpecificVersion =假应该告诉该应用使用的DLL的,而不是2010(10版),2012(11版)。正确??



任何帮助表示赞赏...


解决方案

具体不起作用如果大会<一个HREF =htt​​p://msdn.microsoft.com/en-us/library/h4fa028b.aspx相对=nofollow>强名称签名。微软几乎可以肯定强名称签上自己组装。



您的网站将不得不使用的 bindingRedirect 到所有版本的V10重定向到到V11。例如:



<预类=郎咸平的XML prettyprint-覆盖> <结构>
<&运行GT;
< assemblyBinding的xmlns =瓮:架构 - 微软COM:asm.v1>
< dependentAssembly>
< assemblyIdentity名称=Microsoft.TeamFoundation.Client
公钥=XXXXXXXXXXXXX
=文化中性/>
< bindingRedirect oldVersion =10.0.0.0
NEWVERSION =11.0.0.0/>
< / dependentAssembly>
< / assemblyBinding>
< /运行>
< /结构>

确认更新公钥来的正确的值。






另外,你可以重新编译针对TFS SDK的V11版本的网站,以避免绑定重定向,不过这时它只会与TFS SDK的V11工作。


Our web application makes heavy use of the TFS API. We developed and compiled it with the TFS 2010 API dll's. We also set SpecificVersion=False.

The problem is that when we deploy to a server that has TFS 2012 and not TFS 2010, we get the following error:

Could not load file or assembly 'Microsoft.TeamFoundation.Client, Version=10.0.0.0,.....etc. The system cannot find the file specified.

Any way to migitate this? TFS 2012 is installed into the GAC and the fact we are saying "SpecificVersion=False" should tell the app to use the 2012 (version 11) of the dll's instead of 2010 (version 10). Correct??

Any help appreciated...

解决方案

Specific version does not work if the assembly is strong name signed. Microsoft almost certainly strong-name signed their assembly.

Your website 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.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.


Alternatively, you could recompile the website against the v11 version of the TFS SDK to avoid the binding redirect, however then it will only work with v11 of the TFS SDK.

这篇关于SpecificVersion =假TFS的API的DLL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆