Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
MSBuild Reference
 LC Task
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework General Reference
LC Task

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

The following table describes the paramters for the LC task.

Parameter

Description

ExitCode

Optional Int32 output read-only parameter.

Specifies the exit code provided by the executed command.

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.

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 License Compiler (Lc.exe).

Timeout

Optional Int32 parameter.

Specifies the amount of time, in milliseconds, after which the task executable is terminated. The default value is Int.MaxValue, indicating that there is no time out period.

ToolPath

Optional String parameter.

Specifies the location from where the task will load the underlying executable file (Lc.exe). If this parameter is not specified, the task uses the SDK installation path corresponding to the version of the framework that is running MSBuild.

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>

Concepts

Other Resources

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker