Skip to content

Latest commit

 

History

History
59 lines (46 loc) · 2.14 KB

File metadata and controls

59 lines (46 loc) · 2.14 KB
title GetAssemblyIdentity Task
description Use the MSBuild GetAssemblyIdentity task to retrieve the assembly identities from the specified files and output the identity information.
ms.date 11/04/2016
ms.topic reference
f1_keywords
dev_langs
VB
CSharp
C++
helpviewer_keywords
MSBuild, GetAssemblyIdentity task
GetAssemblyIdentity task [MSBuild]
author ghogen
ms.author ghogen
ms.subservice msbuild

GetAssemblyIdentity task

Retrieves the assembly identities from the specified files and outputs the identity information.

Task parameters

The following table describes the parameters of the GetAssemblyIdentity task.

Parameter Description
Assemblies Optional xref:Microsoft.Build.Framework.ITaskItem[] output parameter.

Contains the retrieved assembly identities.
AssemblyFiles Required xref:Microsoft.Build.Framework.ITaskItem[] parameter.

Specifies the files to retrieve identities from.

Remarks

The items output by the Assemblies parameter contain item metadata entries named Version, PublicKeyToken, and Culture.

In addition to the parameters listed above, this task inherits parameters from the xref:Microsoft.Build.Tasks.TaskExtension class, which itself inherits from the xref:Microsoft.Build.Utilities.Task class. For a list of these additional parameters and their descriptions, see TaskExtension base class.

Example

The following example retrieves the identity of the files specified in the MyAssemblies item, and outputs them into the MyAssemblyIdentities item.

<Project>
    <ItemGroup>
        <MyAssemblies Include="File1.dll;File2.dll" />
    </ItemGroup>
    <Target Name="RetrieveIdentities">
        <GetAssemblyIdentity AssemblyFiles="@(MyAssemblies)">
            <Output TaskParameter="Assemblies" ItemName="MyAssemblyIdentities" />
        </GetAssemblyIdentity>
    </Target>
</Project>

See also