Jacob Morgan

I don't fully understand how x64 affects .NET, but I didn't think I would have to. I thought development should be 32/64 bit agnostic.

Anyway, I've hit a snag after upgrading to Vista x64. Building one of our components produced the following error:

C:\Program Files (x86)\Microsoft Visual Studio 8\SDK\v2.0\bin\LC.exe /target:Elsinore.ReportDesigner.dll /complist:licenses.licx /outdirSurprisebj\Debug\ ....
licenses.licx(2): error LC0004: Exception occurred creating type 'DataDynamics.ActiveReports.Design.Designer, ActiveReports.Design2, Version=4.3.0.1261, Culture=neutral, PublicKeyToken=cc4967777c49a3ff' System.BadImageFormatException: is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)

I saw in some places to use LDR64 /setwow and LDR64 /set64 in pre/post build events to fix this. Well that fixed this particular licensed component, but now another licensed component (that was fine without the ldr64) is giving problems building the same assembly:

C:\Program Files (x86)\Microsoft Visual Studio 8\SDK\v2.0\bin\LC.exe /target:Elsinore.ReportDesigner.dll /complist:licenses.licx /outdirSurprisebj\Debug\ ....
licenses.licx(1): error LC0004: Exception occurred creating type 'Syncfusion.Core.Licensing.LicensedComponent, Syncfusion.Core, Version=4.402.0.51, Culture=neutral, PublicKeyToken=632609b4d040f6b4' System.ComponentModel.LicenseException: A valid license cannot be granted for the type Syncfusion.Core.Licensing.LicensedComponent. Contact the manufacturer of the component for more information.

I have read the following article but it seems to be no help:

http://support.microsoft.com/kb/913961

Am I screwed



Re: 64-Bit .NET Framework Development. 64-bit License Compiler issues

Caddre

I don't know the legalize but technically being 32bits/64bits agnostic is not simple because of pointer arithmetic but there is a very simple solution to your problem, when I develop with Oracle 9i/10g which mostly runs in 64bits I compile the code with AnyCPU and it works like a charm. So you will need three versions of your control, 32bits for only 32bits only develoment, AnyCPU for mixed development using both 32bits and 64bits and 64bits for 64bits only development. Microsoft operating systems in 64bits Win2003 is the first before XP, the former was used to test SQL Server 2000 64bits back in 2001 and Vista, SQL Server 2000 and 2005 comes in 64bits version but not all components comes in 64bits. The link below is a very simple clean formular to use to compile your code. Hope this helps.

http://blogs.msdn.com/joshwil/archive/2005/04/08/406567.aspx






Re: 64-Bit .NET Framework Development. 64-bit License Compiler issues

Jacob Morgan

I looked at your blog entry. I've tried changing the platform target on my assembly to all 3 choices, but the problem seems to be independent of that. I can't compile the 3rd party licensed component assemblies because I don't have the source. The platform of these assemblies seems to be the issue.




Re: 64-Bit .NET Framework Development. 64-bit License Compiler issues

Caddre

(I can't compile the 3rd party licensed component assemblies because I don't have the source.)

In these days of mixed platform it is a good idea to get source code with custom control, I know it cost more but it would have fixed your problem. Your only other solution is to use WOW64 it let you run code in 32bit mode it 64bits box, but it also takes away the benefits of more memory. Try the link below for details.


http://msdn2.microsoft.com/en-us/library/ms241064(vs.80).aspx






Re: 64-Bit .NET Framework Development. 64-bit License Compiler issues

Jacob Morgan

We do have the source code for at least one of the 3rd party components, but they have a "Core" dll that we don't have the source code for that requires the licensing. This seems reasonable.

If you read my first post you can see that I did try the the WOW mode and that worked for one of the components licensing, but broke the other components licensing. My licenses.licx looks like this:

Syncfusion.Core.Licensing.LicensedComponent, Syncfusion.Core
DataDynamics.ActiveReports.Design.Designer, ActiveReports.Design2
DataDynamics.ActiveReports.ActiveReport, ActiveReports

Is there ANY way for me to compile this or do I need to spend 3 days uninstalling/reinstalling my OS and apps




Re: 64-Bit .NET Framework Development. 64-bit License Compiler issues

Caddre

You could call the makers of the component they could have a solution for you since it is licensing related.






Re: 64-Bit .NET Framework Development. 64-bit License Compiler issues

rauschi81

Another issue is the very slow compilation process when a lc is included on a 64 bit windows machine. I'm compiling my software using x86 as platform target to support edit and continue. What happens is that the licese compiler is very slow (5-6 times slower) and a complete build takes more than 1000 secs. 200 at my old x86 machine. Is there any way to speed the things up a bit




Re: 64-Bit .NET Framework Development. 64-bit License Compiler issues

Caddre

I think I covered build with AnyCPU instead of 32bits or 64bits in my very first post, AnyCPU will run on both platform so why are you compiling with 32bits






Re: 64-Bit .NET Framework Development. 64-bit License Compiler issues

rauschi81

To answer your question: Debug - Edit and Continue support is only avaliable on 32 bit --> compile to 32 bit on a 64 bit system solve that problem.

My initial problem is, that the lc is very slow. But it doesn't take the same time to build one solution several times. Sometimes it takes 30 seconds, another time 250 without changing anything. Weird isn't it. What exactly does the lc.exe do when it's compiling





Re: 64-Bit .NET Framework Development. 64-bit License Compiler issues

Caddre

I found some explanations of how to use the license compiler and Microsoft employee covered cross platform debugging but I don't think both are related with your performance problems.

http://blogs.msdn.com/jmstall/archive/2006/03/08/debugging_cross_platform.aspx

http://www.codeguru.com/forum/showthread.php t=368655