Licensing (licx)

I'm having problems creating the licensing file. I've read all the other related posts in this forum and followed the advice - but with no success.

Here are the steps:-

Create a C# console app (framework 1.1)
Create references to the shared dll and the 3 compare engines.
Write code
Create Licence.licx text file
Add 3 lines to the file
RedGate.SQLCompare.Engine.Database
RedGate.SQLDataCompare.Engine.ComparisonSession
RedGate.SQLPackager.Engine.PackagerEngine
Build

I then get "L:\Serena\Build\RedGate\RedGateTasks\Licenses.licx Could not transform licenses file 'Licenses.licx' into a binary resource. (1) : error LC0003 : Unabled to resolve type 'RedGate.SQLCompare.Engine.Database'"

Did I miss a step?

Thanks for your help,

Martin.

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello Martin,

    It looks like you've done your part correctly. At least if you have named the file 'licenses.licx' as indicated in the error message and not 'licence.licx' as you mentioned earlier.

    You may want to try one or two tricks to try to jar things loose:
    • Change the 'copylocal' property of the references for the Red Gate assemblies to False, rebuild, set them to True, rebuild.
    • Have a look at your references path in the project settings
  • Thanks Brian,

    Yes the file is Licenses.licx.... :-).

    The references are correct; however the properties window doesn't expose the copylocal property (the assemblies are in the output directory tho').

    Martin.
  • Hi Brian,

    A quick reinstall of Visual Studio later & I've got my properties back. So, I excluded the licx file and set copylocal to false for the RedGate dll's & rebuilt the project. Then included the licx & set copylocal to true & rebuilt again.

    Still no luck.....

    Martin.
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    What happens if you remove licenses.licx? This should allowed the project to build, but in an unlicensed way.

    Basically, do you think there may be other problems with this project that prevent it from being built?
  • Unfortunately that's too easy. The build error specifically references the licx file and the project builds without the licx file.

    I'll try building manually using csc & lc.

    Martin.
  • Success at last!

    Manually compiling using lc & then csc worked; and then once the licenses resource file was in the project it shook something loose & the project built from the ide. No idea why.

    Martin.
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello Martin,

    There's a bit of a mystery there... I have never gotten Toolkit licensing to work from the command-line lc.exe. Maybe the .licenses file it made was picked up and used by the IDE somehow.
This discussion has been closed.