|
2 | 2 | title: "LC Task | Microsoft Docs"
|
3 | 3 | ms.date: "11/04/2016"
|
4 | 4 | ms.topic: "reference"
|
5 |
| -f1_keywords: |
| 5 | +f1_keywords: |
6 | 6 | - "http://schemas.microsoft.com/developer/msbuild/2003#LC"
|
7 |
| -dev_langs: |
| 7 | +dev_langs: |
8 | 8 | - "VB"
|
9 | 9 | - "CSharp"
|
10 | 10 | - "C++"
|
11 | 11 | - "jsharp"
|
12 |
| -helpviewer_keywords: |
| 12 | +helpviewer_keywords: |
13 | 13 | - "MSBuild, LC task"
|
14 | 14 | - "LC task [MSBuild]"
|
15 | 15 | ms.assetid: d5a53472-6f2a-42b8-a6db-593ca99c9790
|
16 | 16 | author: mikejo5000
|
17 | 17 | ms.author: mikejo
|
18 | 18 | manager: jillfra
|
19 |
| -ms.workload: |
| 19 | +ms.workload: |
20 | 20 | - "multiple"
|
21 | 21 | ---
|
22 | 22 | # LC task
|
23 |
| -Wraps *LC.exe*, which generates a *.license* file from a *.licx* file. For more information on *LC.exe*, see [Lc.exe (License Compiler)](/dotnet/framework/tools/lc-exe-license-compiler). |
24 |
| - |
25 |
| -## Parameters |
26 |
| - The following table describes the parameters for the `LC` task. |
27 |
| - |
28 |
| -|Parameter|Description| |
29 |
| -|---------------|-----------------| |
30 |
| -|`LicenseTarget`|Required <xref:Microsoft.Build.Framework.ITaskItem> parameter.<br /><br /> Specifies the executable for which the *.licenses* files are generated.| |
31 |
| -|`NoLogo`|Optional `Boolean` parameter.<br /><br /> Suppresses the Microsoft startup banner display.| |
32 |
| -|`OutputDirectory`|Optional `String` parameter.<br /><br /> Specifies the directory in which to place the output *.licenses* files.| |
33 |
| -|`OutputLicense`|Optional <xref:Microsoft.Build.Framework.ITaskItem> output parameter.<br /><br /> 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.| |
34 |
| -|`ReferencedAssemblies`|Optional <xref:Microsoft.Build.Framework.ITaskItem>`[]` parameter.<br /><br /> Specifies the referenced components to load when generating the *.license* file.| |
35 |
| -|`SdkToolsPath`|Optional `String` parameter.<br /><br /> Specifies the path to the SDK tools, such as *resgen.exe*.| |
36 |
| -|`Sources`|Required <xref:Microsoft.Build.Framework.ITaskItem>`[]` parameter.<br /><br /> 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)](/dotnet/framework/tools/lc-exe-license-compiler).| |
37 |
| - |
38 |
| - In addition to the parameters listed above, this task inherits parameters from the <xref:Microsoft.Build.Tasks.ToolTaskExtension> class, which itself inherits from the <xref:Microsoft.Build.Utilities.ToolTask> class. For a list of these additional parameters and their descriptions, see [ToolTaskExtension base class](../msbuild/tooltaskextension-base-class.md). |
39 |
| - |
40 |
| -## Example |
41 |
| - The following example uses the `LC` task to compile licenses. |
42 |
| - |
43 |
| -```xml |
44 |
| -<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
45 |
| -<!-- Item declarations, etc --> |
46 |
| - |
47 |
| - <Target Name="CompileLicenses"> |
48 |
| - <LC |
49 |
| - Sources="@(LicxFile)" |
50 |
| - LicenseTarget="$(TargetFileName)" |
51 |
| - OutputDirectory="$(IntermediateOutputPath)" |
52 |
| - OutputLicenses="$(IntermediateOutputPath)$(TargetFileName).licenses" |
53 |
| - ReferencedAssemblies="@(ReferencePath);@(ReferenceDependencyPaths)"> |
54 |
| - |
55 |
| - <Output |
56 |
| - TaskParameter="OutputLicenses" |
57 |
| - ItemName="CompiledLicenseFile"/> |
58 |
| - </LC> |
59 |
| - </Target> |
60 |
| -</Project> |
61 |
| -``` |
62 |
| - |
63 |
| -## See also |
64 |
| - [Tasks](../msbuild/msbuild-tasks.md) |
65 |
| - [Task reference](../msbuild/msbuild-task-reference.md) |
| 23 | +Wraps *LC.exe*, which generates a *.license* file from a *.licx* file. For more information on *LC.exe*, see [Lc.exe (License Compiler)](/dotnet/framework/tools/lc-exe-license-compiler). |
| 24 | + |
| 25 | +## Parameters |
| 26 | +The following table describes the parameters for the `LC` task. |
| 27 | + |
| 28 | +|Parameter|Description| |
| 29 | +|---------------|-----------------| |
| 30 | +|`LicenseTarget`|Required <xref:Microsoft.Build.Framework.ITaskItem> parameter.<br /><br /> Specifies the executable for which the *.licenses* files are generated.| |
| 31 | +|`NoLogo`|Optional `Boolean` parameter.<br /><br /> Suppresses the Microsoft startup banner display.| |
| 32 | +|`OutputDirectory`|Optional `String` parameter.<br /><br /> Specifies the directory in which to place the output *.licenses* files.| |
| 33 | +|`OutputLicense`|Optional <xref:Microsoft.Build.Framework.ITaskItem> output parameter.<br /><br /> 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.| |
| 34 | +|`ReferencedAssemblies`|Optional <xref:Microsoft.Build.Framework.ITaskItem>`[]` parameter.<br /><br /> Specifies the referenced components to load when generating the *.license* file.| |
| 35 | +|`SdkToolsPath`|Optional `String` parameter.<br /><br /> Specifies the path to the SDK tools, such as *resgen.exe*.| |
| 36 | +|`Sources`|Required <xref:Microsoft.Build.Framework.ITaskItem>`[]` parameter.<br /><br /> 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)](/dotnet/framework/tools/lc-exe-license-compiler).| |
| 37 | + |
| 38 | + In addition to the parameters listed above, this task inherits parameters from the <xref:Microsoft.Build.Tasks.ToolTaskExtension> class, which itself inherits from the <xref:Microsoft.Build.Utilities.ToolTask> class. For a list of these additional parameters and their descriptions, see [ToolTaskExtension base class](../msbuild/tooltaskextension-base-class.md). |
| 39 | + |
| 40 | +## Example |
| 41 | +The following example uses the `LC` task to compile licenses. |
| 42 | + |
| 43 | +```xml |
| 44 | +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| 45 | +<!-- Item declarations, etc --> |
| 46 | + |
| 47 | + <Target Name="CompileLicenses"> |
| 48 | + <LC |
| 49 | + Sources="@(LicxFile)" |
| 50 | + LicenseTarget="$(TargetFileName)" |
| 51 | + OutputDirectory="$(IntermediateOutputPath)" |
| 52 | + OutputLicenses="$(IntermediateOutputPath)$(TargetFileName).licenses" |
| 53 | + ReferencedAssemblies="@(ReferencePath);@(ReferenceDependencyPaths)"> |
| 54 | + |
| 55 | + <Output |
| 56 | + TaskParameter="OutputLicenses" |
| 57 | + ItemName="CompiledLicenseFile"/> |
| 58 | + </LC> |
| 59 | + </Target> |
| 60 | +</Project> |
| 61 | +``` |
| 62 | + |
| 63 | +## See also |
| 64 | +[Tasks](../msbuild/msbuild-tasks.md) |
| 65 | +[Task reference](../msbuild/msbuild-task-reference.md) |
0 commit comments