LC Task


This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, use the version selector at the top left. We recommend upgrading to Visual Studio 2019. Download it here

Wraps LC.exe, which generates a .license file from a .licx file. For more information on LC.exe, see Lc.exe (License Compiler).


The following table describes the parameters for the LC task.

Parameter Description
LicenseTarget Required ITaskItem parameter.

Specifies the executable for which the .licenses files are generated.
NoLogo Optional Boolean parameter.

Suppresses the Microsoft startup banner display.
OutputDirectory Optional String parameter.

Specifies the directory in which to place the output .licenses files.
OutputLicense Optional ITaskItem output parameter.

Specifies the name of the .licenses file. If you do not specify a name, the name of the .licx file is used and the .licenses file is placed in the directory that contains the .licx file.
ReferencedAssemblies Optional ITaskItem[] parameter.

Specifies the referenced components to load when generating the .license file.
SdkToolsPath Optional String parameter.

Specifies the path to the SDK tools, such as resgen.exe.
Sources Required ITaskItem[] parameter.

Specifies the items that contain licensed components to include in the .licenses file. For more information, see the documentation for the /complist switch in Lc.exe (License Compiler).

In addition to the parameters listed above, this task inherits parameters from the ToolTaskExtension class, which itself inherits from the ToolTask class. For a list of these additional parameters and their descriptions, see ToolTaskExtension Base Class.


The following example uses the LC task to compile licenses.

<Project xmlns="">  
<!-- Item declarations, etc -->  
    <Target Name="CompileLicenses">  

See Also

Task Reference