Referencing SDK for Trial
clamk123
Posts: 40
I've been wanting to try out the SQL Comparison SDK, and have been having issues.
I reference the components as per the documentation and it compiles fine.
When I execute the code, it gets to any Redgate object (such as Database) that invokes licensing, and it pops up the Licensing window (the one where you can activate the product, or "skip" it for a 14 day trial).
I choose skip and immediately get the below error:
I don't have a license to activate it (haven't decided if this is useful to code the API directly) but I just can't get the SDK to work by using the SKIP option.
I've tried Windows XP, Windows 7, formatted and resintalled a dev computer, tried every single .net Framwork and service pack, multiple versions of Visual Studio 2010/2008. The above example was written in notepad to remove possible VS issues. I've compiled under .net 2.0, 3.0, 3.5, 4.0.
I've tried adding licenses.licx files and played with it, even manually licensing the code itself.
But no matter what, the above error persists whenever it touches a object with the Licensing attribute on it.
I'm sure I've done massive overkill in debugging this. I've looked through all the requirements for MDAC, .net, OS, that is listed for this product, but I cannot find a way to make it work.
I'm sure it's something simple that's I've screwed up, I'd love to know what it is.
Thanks.
I reference the components as per the documentation and it compiles fine.
When I execute the code, it gets to any Redgate object (such as Database) that invokes licensing, and it pops up the Licensing window (the one where you can activate the product, or "skip" it for a 14 day trial).
I choose skip and immediately get the below error:
Unhandled Exception: System.ArgumentNullException: Value cannot be null. Parameter name: format at System.String.Format(IFormatProvider provider, String format, Object[] arg s) at RedGate.SQLToolkit.Engine.Licensing.ToolkitLicenceProvider.GetLicense(Lice nseContext context, Type type, Object instance, Boolean allowExceptions) at System.ComponentModel.LicenseManager.ValidateInternalRecursive(LicenseCont ext context, Type type, Object instance, Boolean allowExceptions, License& licen se, String& licenseKey) at System.ComponentModel.LicenseManager.Validate(Type type, Object instance) at RedGate.SQLCompare.Engine.Database..ctor() at Program.Program.Main(String[] args)
I don't have a license to activate it (haven't decided if this is useful to code the API directly) but I just can't get the SDK to work by using the SKIP option.
I've tried Windows XP, Windows 7, formatted and resintalled a dev computer, tried every single .net Framwork and service pack, multiple versions of Visual Studio 2010/2008. The above example was written in notepad to remove possible VS issues. I've compiled under .net 2.0, 3.0, 3.5, 4.0.
I've tried adding licenses.licx files and played with it, even manually licensing the code itself.
But no matter what, the above error persists whenever it touches a object with the Licensing attribute on it.
I'm sure I've done massive overkill in debugging this. I've looked through all the requirements for MDAC, .net, OS, that is listed for this product, but I cannot find a way to make it work.
I'm sure it's something simple that's I've screwed up, I'd love to know what it is.
Thanks.
Comments
1) Reference the RedGate.Shared.SQL, RedGate.Shared.Utils, and RedGate.SQLCompare.Engine (I also reference System.Web as some components internally reference it), from the Sql Comparison SDK/assembly folder from the SDK install.
2) In code, create an instance of the Database class.
3) On execution, it pops up the licensing window, I choose "Skip".
4) Above exception is thrown, with the "null" issue with the format parameter.
RedGate.SQLCompare.Engine (v. 10.0.0.192) appears to be targeting framework (v2.0.50727). I've targeted my executable to target .net 2.0, 3.0, 3.5, 4.0, and each time I get the same above error.
I've also added references to everything in the assembly folder (.Rewriter, .Licensing, .ASTParser) in case there was a dependency there, but has not resolved the exception.
When I attempt to execute the line of code that creates an instance of the Database class, it doesn't prompt for licensing, but the exception pops up immediately (null for format parameter).
I only ask because this was recently loaded onto a dev box that's never used it before, and the window still states its under a 14 day trial (we've never actually been able to trial it, so I don't know if it should be decrementing time at this point or how your internal licensing works).
But I appreciate you listing it as a bug, we've tried it several different ways and just can't figure out what we're doing wrong.
The Database object is created, the licensing/trial popup lets me choose activate or skip, after skip is chosen, the code continuesto run (with the trial popup message box popping up) and the test code "works".
So it seems that I can get the older version to work, but I still can't get Sql Comparison SDK 10 to work without that weird licensing window exception.
ftp://support.red-gate.com/patches/sql_ ... .0.111.zip
I appreciate your help.