Skip to content

Latest commit

 

History

History
67 lines (55 loc) · 2.9 KB

lc-task.md

File metadata and controls

67 lines (55 loc) · 2.9 KB
title description ms.date ms.topic f1_keywords dev_langs helpviewer_keywords author ms.author manager ms.subservice
LC Task
Learn how MSBuild uses the LC task to wrap LC.exe, which generates a .license file from a .licx file.
11/04/2016
reference
VB
CSharp
C++
MSBuild, LC task
LC task [MSBuild]
ghogen
ghogen
mijacobs
msbuild

LC task

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

Parameters

The following table describes the parameters for the LC task.

Parameter Description
LicenseTarget Required xref:Microsoft.Build.Framework.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 xref:Microsoft.Build.Framework.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 xref:Microsoft.Build.Framework.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 xref:Microsoft.Build.Framework.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).

[!INCLUDE ToolTaskExtension arguments]

Example

The following example uses the LC task to compile licenses.

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Item declarations, etc -->

    <Target Name="CompileLicenses">
        <LC
            Sources="@(LicxFile)"
            LicenseTarget="$(TargetFileName)"
            OutputDirectory="$(IntermediateOutputPath)"
            OutputLicenses="$(IntermediateOutputPath)$(TargetFileName).licenses"
            ReferencedAssemblies="@(ReferencePath);@(ReferenceDependencyPaths)">

            <Output
                TaskParameter="OutputLicenses"
                ItemName="CompiledLicenseFile"/>
        </LC>
    </Target>
</Project>

See also