-
December 15th, 2005, 01:29 AM
#1
.NET Framework CLR Tools: How do I use the License Compiler?
Q: How do I use the License Compiler?
A: The License Compiler reads text files that contain licensing information and produces a '.licenses' file that can be embedded in a common language runtime executable as a resource.
- What are the options available with the License Compiler?
- /complist:filename
Specifies the name of a file that contains the list of licensed components to include in the '.licenses' file. Each component is referenced using its full name with only one component per line. Command-line users can specify a separate file for each form in the project. Lc.exe accepts multiple input files and produces a single .licenses file.
- /h[elp]
Displays command syntax and options for the tool.
- /i:modules
Specifies the list of modules that contain the components listed in the '/complist' file.
- /nologo
Suppresses the Microsoft startup banner display
- /outdir: path
Specifies the directory in which to place the output '.licenses' file.
- /target:targetPE
Specifies the executable for which the '.licenses' file is being generated.
- /v
Specifies verbose mode; displays compilation progress information.
- /?
Displays command syntax and options for the tool.
- How do I use the Lc.exe tool?
You run the 'Lc.exe' tool from the command prompt
Code:
lc /target:targetPE /complist:filename [/outdir:path]
/i:modules [/nologo] [/v]
- Can I have an example?
The following command compiles 'myApp.licenses' from the lists of licensed components specified by 'hostapplic.txt', 'hostapplic2.txt' and 'hostapplic3.txt'. The 'modulesList' argument specifies the modules that contain the licensed components.
Code:
lc /target:myApp /complist:hostapplic.txt /complist:hostapplic2.txt /complist: hostapplic3.txt /i:modulesList
- Can I have another example?
- If you are using a licensed control 'MyCompany.Samples.LicControl1' contained in 'Samples.dll' in an application called 'HostApp.exe', you can create 'HostAppLic.txt' that contains the following:
Code:
MyCompany.Samples.LicControl1, Samples.DLL
- Create the '.licenses' file called 'HostApp.exe.licenses' using the following command:
Code:
lc /target:HostApp.exe /complist:hostapplic.txt /i:Samples.DLL /outdir:c:\bindir
- Build 'HostApp.exe' including the '.licenses' file as a resource. If you were building a C# application you would use the following command to build your application:
Code:
csc /res:HostApp.exe.licenses /out:HostApp.exe *.cs
- The following command compiles 'myApp.licenses' from the lists of licensed components specified by 'hostapplic.txt', 'hostapplic2.txt' and 'hostapplic3.txt'. The 'modulesList' argument specifies the modules that contain the licensed components:
Code:
lc /target:myApp /complist:hostapplic.txt /complist:hostapplic2.txt /complist: hostapplic3.txt /i:modulesList
Last edited by Andreas Masur; December 22nd, 2005 at 05:59 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|