Can compile when licenses.licx is empty

Andreas PreuskerAndreas Preusker Posts: 3
edited December 6, 2007 7:18AM in SQL Toolkit Previous Versions
Hi,

when i try to compile my compare project (VS2005) on a XP 64bit maschine and have the following entries in the licenses.licx (RedGate.SQLCompare.Engine.Database, RedGate.SQLCompare.Engine) , i get an error : "could not load file or assembly .... RedGate.SqlCompare.Engine.dll". The setting "target platform" is set to x86.

If the licenses.licx is empty, i can compile the project.
What's my fault?

We are using "Red Gate SQL Bundle Pro". Where does the license information have to be stored?

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi Andreas,

    Thanks for your post. There is a technical reason why this happens, and it's nothing to do with how you've set up licenses.licx or your project. When Visual Studio determines that it needs to licence an assembly, it calls a utility called lc.exe, which comes in a 64-bit version and a 32-bit version. Even when you compile your application as 32-bit, you still need to trick Visual Studio into loading 32-bit lc.exe. This can be done using a pre-build and a post-build event:

    Right-click the project and select properties. Next, click 'Build Events'.
    Set a new pre-build event:
    c:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\Ldr64.exe setwow
    Set a new post-build event:
    c:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\Ldr64 set64

    Note that the paths may differ based on the installation folder of your .NET Framework.
  • Hi Brian,

    thanx, that worked. I'm happy now ;-) ......
Sign In or Register to comment.