Help and Support
 

powered byLive Search

The License Compiler (Lc.exe) throws an exception when a .NET Framework 2.0 application consumes licensed components on a computer that is running a 64-bit operating system

Article ID:913961
Last Review:December 3, 2007
Revision:2.2

SYMPTOMS

Consider the following scenario. You build a Microsoft .NET Framework 2.0-based application in Microsoft Visual Studio 2005. The application consumes licensed components on a computer that is running a 64-bit operating system. However, you compiled the application for a 32-bit operating system. In this scenario, the License Compiler (Lc.exe) throws an exception that resembles the following:
Exception occurred creating type 'LicensedComponent.UserControl1, LicensedComponent, Version=1.0.1.100, Culture=neutral, PublicKeyToken=null' System.ComponentModel.LicenseException: A valid license cannot be granted for the type LicensedComponent.UserControl1. Contact the manufacturer of the component for more information. C:\Documents and Settings\Administrator\Desktop\LC\LCIssue\64BitIssue\Properties\licenses.licx 1 64BitIssue

Back to the top

CAUSE

This problem occurs because the License Compiler always runs as a 64-bit application on a computer that is running a 64-bit operating system. However, the License Compiler does not support 32-bit applications that are running on 64-bit operating systems. the License Compiler only supports 32-bit applications that are running on 32-bit operating systems.

Back to the top

RESOLUTION

To resolve this problem, build a binary file to specify that the application is built for a 32-bit operating system. Build the binary file by using the appropriate flags of the License Compiler.

Note Do not use the Ldr64.exe command to force all code to run as a 32-bit application.

Back to the top

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Back to the top

MORE INFORMATION

For more information about the License Compiler, visit the following Microsoft Developer Network (MSDN) Web site:
http://msdn2.microsoft.com/en-us/library/ha0k3c9f(vs.71).aspx (http://msdn2.microsoft.com/en-us/library/ha0k3c9f(vs.71).aspx)

Back to the top


APPLIES TO
Microsoft .NET Framework 2.0
Microsoft Visual Studio 2005 Standard Edition
Microsoft Visual Studio 2005 Professional Edition
Microsoft Visual Studio 2005 Express Edition

Back to the top

Keywords: 
kberrmsg kbtshoot kbprogramming kbprb KB913961

Back to the top

Article Translations

 

Other Support Options

  • Need More Help?
    Contact a Support professional by E-mail, Online or Phone.
  • Customer Service
    For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
  • Newsgroups
    Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.