SpecificVersion = False with dll in TFS API

Our web application makes extensive use of the TFS API. We developed and compiled it using the dll TFS 2010 API. We also set SpecificVersion = False.

The problem is that when deploying to a server with 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 redirect this? TFS 2012 is installed in the GAC, and the fact that we say "SpecificVersion = False" should say the application should use 2012 (version 11) dll instead of 2010 (version 10). Right??

Any help is appreciated ...

+1


source to share


1 answer


The specific version does not work if the assembly has a strong name signed . Microsoft has almost certainly confirmed its meeting.

Your website will need to use bindingRedirect

to redirect all versions 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 publicKeyToken

to the correct value.


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

+2


source







All Articles