Could not load file or assembly RedGate.SQLCompare.ASTParser

jw970170jw970170 Posts: 16
edited November 2, 2007 6:49AM in SQL Toolkit Previous Versions

I get this error when I try to RegisterForDataCompare

"Could not load file or assembly 'RedGate.SQLCompare.ASTParser, Version=, Culture=neutral, PublicKeyToken=7f465a1c156d4d57' or one of its dependencies. The system cannot find the file specified."
Here is my code

dbLocal = new Database();
dbLocal.RegisterForDataCompare(new ConnectionProperties(server, database, username, password));

I even put the file RedGate.SQLCompare.ASTParser.dll in the same directory as the exe but it didn't help with anything.

Any ideas?


  • This will happen if you use the SQLCompare dlls from the SQL Compare directory and the SQL Data Compare dlls from the SQL Data Compare directory.

    Don't mix and match the dlls and it should work ok. i.e. use *only* files from the SQL Compare directory *OR* the SQL Data Compare Directory in a single project.

    Yes it's a bit of a faff at the moment and we're looking into ways to improve it.


    Richard Mitchell
    Project Manager
    Red Gate Software Ltd
  • I've re-copied the required dlls from SQL Data Compare directory. They are all from the same directory. I still get the error.

    It says the system could not find the file specified....but I'm not supposed to reference the ASTParser.dll. I think I tried with the file referenced as well but it didn't make a difference.
  • ok, I didn't realize how many red gate dlls i needed to do the data compare. I hav corrected the issue. I just needed to copy some other dlls to the exe directory

  • This is the full list of Red Gate Dlls you need....

    * RedGate.BackupReader.CryptoHelper.dll
    * RedGate.BackupReader.dll
    * RedGate.BackupReader.SqbReader.dll
    * RedGate.Shared.Utils.dll
    * RedGate.SQL.Shared.dll
    * RedGate.SQLCompare.ASTParser.dll
    * RedGate.SQLCompare.BackupReader.dll
    * RedGate.SQLCompare.Engine.dll
    * RedGate.SQLCompare.Rewriter.dll
    * RedGate.SQLDataCompare.Engine.dll
    * rglz.dll
    * System.Data.SQLite.dll
    * zlib1.dll

    I know it's a lot!
    Richard Mitchell
    Project Manager
    Red Gate Software Ltd
Sign In or Register to comment.