visual web express, valid license (licenses.licx) issue

kuponutcomkuponutcom Posts: 17
edited October 16, 2006 6:59PM in SQL Compare Previous Versions
I am getting the error:
System.ComponentModel.LicenseException: You do not have a valid license for the SQL Comparison and Synchronization Toolkit.

i am using v3.38 (according to the "readme.txt" file's information, located in the root of my installed and licensed redgate sql compare)

and after researching this error on your forums, it is my understanding from most suggestions that the underlying issue with this licensing error, is that it must be "compiled" into the project?

however, visual web express 2005 does not have any compiling features as it makes use of the "just in time compiling"

is there any way a visual web express project can make use of the sql compare toolkit code? -- can anyone please point me in the right direction?


  • i have added "licenses.licx" to the root of my 2.0 c# web application

    inside the licenses.licx file is one line: (without the quotes)
    "RedGate.SQLCompare.Engine.Database, RedGate.SQLCompare.Engine"

    i have "add reference" to
    - c:\program files\redgate sql compare\RedGate.Sql.Shared.dll
    - c:\program files\redgate sql compare\RedGate.SqlCompare.Engine.dll

    and in one of my .cs app_code class files i have referenced them:
    using RedGate.SQL.Shared;
    using RedGate.SQLCompare.Engine;

    i have also copy/pasted "SQL Compare.lic" from
    - c:\program files\redgate sql compare\SQL Compare.lic
    - c:\myWebApp\bin\SQL Compare.lic
    ... altho im not sure if this part matters

    when i right click on "licenses.licx" in the solution explorer, it gives the option "Build Runtime Licenses". after i click "build runtime licenses" it initiates a 'build' and then i receive this error:

    C:\myWebApp\licenses.licx: Could not transform licenses file into a binary resource. Index (zero based) must be greater than or equal to zero and less than the size of the argument list.

    ... no idea what that error means. help?
  • Brian DonahueBrian Donahue Posts: 6,590 New member

    Can you build a 'non-web' project type with your development environment, for instance a console application? If you can build one of the Toolkit examples, that will produce a 'SQL Toolkit.lic' file after successfully activating the product. If you then throw this file into the 'bin folder of your application, it should automagically licence your application without the need to enter a serial number (which you cannot do anyway because a web project cannot display the UI that it needs in order for you to input the serial number).
  • I have purchased the toolkit package from redgate today. I did as you said and it generated the SqlToolkit.lic file. I put that file in the /bin/ of the project

    I right clicked on "licenses.licx", clicked "build runtime licenses", and got the same exact error as before

    Could not transform licenses file into a binary resource. Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
  • Brian DonahueBrian Donahue Posts: 6,590 New member

    I'm not familiar with the 'build runtime licenses' command, but I think it doesn't cause the Red Gate licensing assemblies to be invoked. Can you just build the project itself rather than using this function?

  • well, another issue i'm facing is this:

    I want to use 2.0
    - to use it, my only option is to use "visual web express". I have VS 2003 Pro installed on my computer, which can compile, but it cannot use 2.0 ... I would have to buy VS 2005. Which I really don't want to do (unless I come across another reason to buy it other than for its "compiling" features).

    So to answer your question from previous post: I'm pretty sure that "build project" and "rebuild project" ignores the licenses. in the same drop down that prompts you for build/rebuild, is also a "build licenses". it is this option (whether i use the drop down or my right click > build licenses) which causes the error
  • As far as I can tell, this problem has resolved itself.

    the "build license" still gives me that error, but, i only assumed that "build license" is required to get things to work correctly

    right now I'm assuming this issue is resolve because i'm no longer getting the "invalid license key" error, and now instead im getting other errors that are errors as tho my code isn't set up quite right.

    i think the JIT compiling might be perhaps auto creating the proper stuff to get this working as it should, to use licenses as it should. unless i post here again complaining, assume this issue is resolved

    thanks for your help
This discussion has been closed.