Can compile when licenses.licx is empty

Forum for users of SQL Toolkit 3,4,and 5

Can compile when licenses.licx is empty

Postby Andreas Preusker » Thu Dec 06, 2007 12:31 pm

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?
Andreas Preusker
 
Posts: 2
Joined: Thu Nov 29, 2007 5:18 pm

Postby Brian Donahue » Thu Dec 06, 2007 1:01 pm

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.
Brian Donahue
 
Posts: 6669
Joined: Mon Aug 23, 2004 10:48 am

Postby Andreas Preusker » Thu Dec 06, 2007 1:18 pm

Hi Brian,

thanx, that worked. I'm happy now ;-) ......
Andreas Preusker
 
Posts: 2
Joined: Thu Nov 29, 2007 5:18 pm


Return to SQL Toolkit Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests