'RedGate.SQLDataCompare.Distribution.dll' is invalid

anewhallanewhall Posts: 6
I am trying to run the following command:
sqldatacompare /project:D:\RaveDBUpdatePublisher\RGProjects\Data\RGProject_HazMatDataCompareProject.sdc /force /export:d:\Temp

I am getting the following error message:
D:\Test Tools\T_compare DB tool>sqldatacompare /project:D:\RAVEDBUpdatePublisher

\RGProjects\Data\RGProject_HazMatDataCompareProject.sdc /force

Red Gate SQL Data Compare Command Line Utility V5.3.0.81

==============================================================================

Copyright c Red Gate Software Ltd 2004-2006

Unexpected error: The format of the file
'RedGate.SQLDataCompare.Distribution.dll' is invalid.

The format of the file 'RedGate.SQLDataCompare.Distribution.dll' is invalid.

System.BadImageFormatException

at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, B
oolean isStringized, Evidence assemblySecurity, Boolean throwOnFileNotFound, Ass
embly locationHint, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Boolean
stringized, Evidence assemblySecurity, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile, Evidence security
Evidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
at _1._2(String )
at _1._5()
at RedGate.SQLDataCompare.CommandLine.Runner.Run()
at RedGate.SQLDataCompare.CommandLine.Startup._1(String[] )


The odd thing is this works on some systems, but not others. I have found the posts that refer to the .Net 1.1 and .Net 2.0, but this doesn't seem to be making a difference.

Thanks!

Comments

  • Eddie DEddie D Posts: 1,802 Rose Gold 5
    I am unsure on the cause of this error.

    The RedGate.SQLDataCompare.Distribution.dll file is created along with the RedGate.SQLDataCompare.Distribution.mod after you have activated the license and run the tool for the first time. Also that you have either purchased SQL Data Compare Pro Edition or SQL Bundle Pro Edition

    On the systems generating this error:

    1. Have these systems been activated using a SQL Data Compare Pro License?

    2. If the answer is yes, has the command line been run on these systems to generate RedGate.SQLDataCompare.Distribution.dll and RedGate.SQLDataCompare.Distribution.mod files?

    Many Thanks
    Eddie

    Eddie Davis
    Red Gate Software Ltd
    Technical Support
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
  • Thanks for the reply. In answer to your questions:
    1. Yes, I do have a license on the machine where I am building the application.

    2. No, the distibuted systems do not have the licenses.

    I have included the required files for the command line distribution according to the help documentation.

    Thanks,
    Aimee
  • I forgot to add, yes, I did run the commandline on my licensed system to create the files mentioned - distribution.dll and .mod files.
  • Eddie DEddie D Posts: 1,802 Rose Gold 5
    Hi

    On the systems that have generated the reported error, do they have SQL Data Compare installed upon them?

    If the answer is no, can you please installed SQL Data Compare onto them, activate or license the installtion and then retry your Command Line comparison.

    Many Thanks
    Eddie

    Eddie Davis
    Red Gate Software Ltd
    Technical Support
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi,

    I've disassembled the RedGate.SQLDataCompare.Distribution.mod and dll files, and it looks like the dll simply reads the .mod, which contains a licence file with some encrypted intormation in it.

    My thought is that there are two possible problems: one that the version of .NET you have installed can't read the resources out of the .mod file. So it may be useful to know which versions of .NET Framework are installed. Secondly, the infamous cryptoAPI is probably needed to decrypt the resource. So I'd check that the user running the command has a valid profile (not temporary or not writable). Also, this user's machinekey store could be unreachable, for the reason that the user profile is somehow broken or doesn't have access to the computer's main machinekey store (%allusersprofile%\application data\microsoft\crypto\RSA).

    Hopefully this helps!
Sign In or Register to comment.