Red Gate forums :: View topic - ComparisonSession still prompting for license/trial copy
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Comparison SDK Previous Versions
SQL Comparison SDK Previous Versions forum

ComparisonSession still prompting for license/trial copy

Search in SQL Comparison SDK Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
tony_mocella



Joined: 13 Feb 2009
Posts: 3

PostPosted: Fri Feb 13, 2009 9:43 pm    Post subject: ComparisonSession still prompting for license/trial copy Reply with quote

I'm running up against an error where my built application is still prompting people for a license-key or the "trial expired" prompts as soon as the application gets to where it should be setting up a new ComparisonSession.

I used the article "Manually licensing Red Gate assemblies" to create a .licenses file for my application, which is set as an embedded resource in my application.

When I use Reflector to inspect my assembly, I can see that the licenses file is indeed embedded into my assembly, and that the license-key is the one I was supplied when we bought the SDK.

I'm not really sure what else I need to check to verify/understand why I'm getting prompted for a key on all machines besides my own machine.

Any pointers/assistance are appreciated.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6678

PostPosted: Mon Feb 16, 2009 7:24 pm    Post subject: Reply with quote

Hi,

I can think of a few reasons for an invalid licence resource. If you find the licence resource in your assembly output, then either the resource had been created with the wrong name, the assembly had been renamed, or the library being used is not licensed.

If you want to change the name of your assembly, it's necessary to completely rebuild it with the new name. Renaming a compiled assembly breaks the licensing.

The resource must also have a name that matches the assembly name, case-sensitively. If your assembly is called Foo.exe, then your licensing resource should be called Foo.exe.licenses.

If you are using SQL Data Compare, then the licence resource must contain the text RedGate.SQLDataCompare.Engine.ComparisonSession. If this is missing, maybe you have only licensed the schema components of the SQL Comparison SDK and not the data components. If you are using both, then you have to make sure that you include them both in the licenses.licx file, for instance

RedGate.SQLCompare.Engine.Database, RedGate.SQLCompare.Engine <new line>
RedGate.SQLDataCompare.Engine.ComparisonSession, RedGate.SQLDataCompare.Engine <new line>
Back to top
View user's profile Send private message
tony_mocella



Joined: 13 Feb 2009
Posts: 3

PostPosted: Mon Feb 16, 2009 7:41 pm    Post subject: Reply with quote

I'll run through the exact steps to see if you might pin-point where I went wrong.

I'm using the SDK from an assembly in my application (not the executing assembly, a class library in my solution) that we'll call "foo.domain.dll" (this has never been renamed since we created the project months ago).

Inside the foo.domain project, I've added a licenses.txt file with the following text:
RedGate.SQLCompare.Engine.Database,RedGate.SQLCompare.Engine
RedGate.SQLDataCompare.Engine.ComparisonSession,RedGate.SQLDataCompare.Engine

I opened up a command-prompt in the location where this txt file resides, and run the following (the binaries reside in the lib folder in the script):
lc.exe /target:"Foo.Domain.dll" /complist:"licenses.txt" /i:"C:\Projects\Trunk\Source\Foo\lib\RedGate.SQLDataCompare.Engine.dll" /i:"C:\Projects\Trunk\Source\Foo\lib\RedGate.SQLCompare.Engine.dll"

I add the newly created "foo.domain.dll.resources" file to my foo.domain project, and set it to be an embedded resource.

At some point, I was prompted to input my license number for the SDK which seemed to work and as I mentioned, when I run Reflector over my foo.domain.dll, I see the resources file indicating my two RedGate products from the license and later the license-key that I entered.

Again, all "works on my machine" but when I pass the contents of my bin\ folder to another person, they receive the "trial expired" error message.

The license we purchased was for SQL Comparison SDK.

Let me know if there's any other info that can help resolve these errors.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6678

PostPosted: Tue Feb 17, 2009 12:33 pm    Post subject: Reply with quote

Hi,

The resource embedded in the dll should be called Foo.Domain.dll.licenses rather than Foo.Domain.dll.resources. I suspect that this could have simply been a typo.

If it is, I don't know what else to tell you. Maybe you can look into compiling with Visual Studio. When you create a file called licenses.licx and set the compile action to "embedded resource", then Visual Studio will do all of this stuff automatically at build time.

The only reasons for the "how to licence manually" are for when you want to build SDK projects on a continuous integration server or for when Visual Studio malfunctions when trying to create licenses automatically.
Back to top
View user's profile Send private message
tony_mocella



Joined: 13 Feb 2009
Posts: 3

PostPosted: Tue Feb 17, 2009 5:59 pm    Post subject: Reply with quote

I've changed back to using a .licx file in Visual Studio, and the application no longer seems to prompt for "expired trial...enter license" on other machines when I deploy to other machines.

Thanks for your assistance in resolving this situation.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group