License compiler (lc.exe)

Source: Internet
Author: User

This day, when the project is scheduled to be completed, the compilation cannot be completed. The error is that lc.exe has exited,Code-1. this made me feel depressed for at least 30 minutes. After I checked it online, I realized the cause. We used a third-party component (infragistics) in our project. Why, refer:
Http://smartstone.cnblogs.com/archive/2006/06/08/420862.html

In the following example, lc.exe, lc.exe is the license compiler, which reads text files containing authorization information,And generate a. Licenses file that can be embedded as a resource into the executable file of the common language runtime.

LC/Target: targetpe/complist: filename [/outdir: path]
/I: modules [/nologo] [/V]

Option Description

/Complist: Filename

Name of the file that contains the authorization component list. These authorization components must be included in the. Licenses file. Each component is referenced by its full name, and each line has only one component.

The command line user can specify a separate file for each form in the project. Lc.exe accepts multiple input files and generates a. Licenses file.

/H[ELP]

Displays the command syntax and options of the tool.

/I: Module

Specify modules that contain files/ComplistComponents listed in. To specify multiple modules, use multiple/IFlag.

/Nologo

Undisplay Microsoft startup title.

/Outdir: Path

Specifies the directory for storing the output. Licenses file.

/Target: Targetpe

Specifies the executable file for which the. Licenses file is generated.

/V

Specify the verbose mode and display the compilation progress.

/?

Displays the command syntax and options of the tool.

Instance:

1. If you are usingHostapp.exe ApplicationProgramInSamples. dllAuthorization Control inMycompany. samples. liccontrol1, You can createHostapplic.txt.

Mycompany. samples. liccontrol1 , Samples. dll

2. Use the following command to createHostapp.exe. Licenses. Licenses file.

LC/Target: hostapp.exe/complist: hostapplic.txt/I: samples. dll/outdir: C: \ bindir

3. Generate a resource that includes the. Licenses FileHostapp.exe. If the C # application is generated, use the following command to generate the application.

CSC/Res: hostapp.exe. licenses/out: hostapp.exe *. CS

The following commandHostapplic.txt,Hostapplic2.txtAndHostapplic3.txtCompile the specified authorization component listMyApp. Licenses.ModuleslistThe parameter specifies the module that contains the authorization component.

LC/Target: MyApp/complist: hostapplic.txt/complist: hostapplic2.txt/complist: hostapplic3.txt/I: moduleslist

References: http://msdn2.microsoft.com/zh-cn/library/ha0k3c9f.aspx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.