SQLDataCompare.Engine needs System.Threading.dll

alex_sefrinalex_sefrin Posts: 17
We're currently using RedGate.SQLDataCompare.Engine 10.7. for our nightly VisualStudio tests (v13 update 4, .NET framework 4.0) to compare tables.
After upgrading to 10.7 and Framework 4.0 we suddenly need the System.Threading.dll for tests to be executed. We provided this DLL and everything works fine, till we started using Microsoft.Fakes in our tests.

The compiler mentioned that certain methods found in mscorlib.dll and system.threading.dll.
Der Typ 'System.Collections.Concurrent.ConcurrentDictionary<TKey,TValue>' ist sowohl in 'c:Program Files (x86)Reference AssembliesMicrosoftFramework.NETFrameworkv4.0mscorlib.dll' als auch in 'c:DataComparerinx86DebugSystem.Threading.dll' vorhanden. 
[C: DataComparer.UnitTestobjx86DebugFakesmf.csproj]	C:DataComparer.UnitTestf.cs	777	103	DataComparer.UnitTest

Why does the RedGate.SQLDataCompare.Engine need the system.threading.dll for registerfordatacompare in the current directory and doesn’t use it from the .NETFramework?
How can I fix the problem?

Thanks for help!


Alex

Comments

  • Eddie DEddie D Posts: 1,380 Rose Gold 1
    Hi Alex

    The dll files for SQL Data Compare V10.7 were built using .Net Framework 3.5 and therefore require the 'system.threading.dll' to work correctly on a machine running .Net Framework V4.

    I understand that Microsoft.fakes is something used in unit testing via Visual Studio, but it has no link to SQL Data Compare. Unless, you have posted in the wrong forum and you are using the SQL Comparison SDK and testing a project you have created that makes use of the SQL Data Compare dll files.

    Many Thanks
    Eddie
    Eddie Davis
    Technical Support Engineer
    Redgate Software Ltd
    Email: [email protected]
  • Hi Eddie,

    the problem is, that the RedGate.SQLDataCompare.Engine needs the old version of System.Threading.Dll (1.0.2856.102) in the same directory, on a machine with .Net Framework 4.0. I'm not sure if .Net Framework 3.5 had this old dll.

    For my local tests I found a workaround. I create an app.config
    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
      <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="System.Threading" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0-1.0.2856.102" newVersion="4.0.30319.34209" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0-1.0.2856.102" newVersion="4.0.30319.34209" />
          </dependentAssembly>
        </assemblyBinding>
      </runtime>
    </configuration>
    

    For the tests which are started by a nightly build, this solution didn't work because the app.config is disregarded by the build.


    Best regard,

    Alex
  • Putting the old version of System.threading.dll in the GAC solved the Problem.
  • using SQL Comparison SDK v10 and getting this error:
    ould not load file or assembly 'System.Threading, Version=1.0.2856.102, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified."
Sign In or Register to comment.