Signing Class

MSBuild Extension Pack

Signing Class MSBuild Extension Pack Help 4.0.12.0
Valid TaskActions are:

AddSkipVerification (Required: PublicKeyToken Optional: ToolPath)

RemoveAllSkipVerification (Optional: ToolPath)

Sign (Required: Assemblies, KeyFile Optional: ToolPath)

Remote Execution Support: NA

Inheritance Hierarchy

SystemObject  Microsoft.Build.UtilitiesTask
    MSBuild.ExtensionPackBaseTask
      MSBuild.ExtensionPack.FrameworkSigning

Namespace: MSBuild.ExtensionPack.Framework
Assembly: MSBuild.ExtensionPack (in MSBuild.ExtensionPack.dll) Version: 4.0.0.0

The Signing type exposes the following members.

Constructors

  NameDescription
Public methodSigning
Top
Properties

  NameDescription
Public propertyAssemblies
Sets the Item Collection of Assemblies to sign
Public propertyKeyFile
Sets the KeyFile to use when Signing the Assemblies
Public propertyPublicKeyToken
Sets the PublicKeyToken for AddSkipVerification
Public propertyToolPath
Sets the folder path to sn.exe
Top
Examples

<Project ToolsVersion="4.0" DefaultTargets="Default" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <PropertyGroup>
        <TPath>$(MSBuildProjectDirectory)\..\MSBuild.ExtensionPack.tasks</TPath>
        <TPath Condition="Exists('$(MSBuildProjectDirectory)\..\..\Common\MSBuild.ExtensionPack.tasks')">$(MSBuildProjectDirectory)\..\..\Common\MSBuild.ExtensionPack.tasks</TPath>
    </PropertyGroup>
    <Import Project="$(TPath)"/>
    <Target Name="Default">
        <ItemGroup>
            <AssemblyToSign Include="C:\AnAssembly.dll"/>
        </ItemGroup>
        <!-- Sign an assembly -->
        <MSBuild.ExtensionPack.Framework.Signing TaskAction="Sign" ToolPath="C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin" KeyFile="c:\aPrivateKey.snk" Assemblies="@(AssemblyToSign)"/>
        <!-- Add SkipVerification for a public key -->
        <MSBuild.ExtensionPack.Framework.Signing TaskAction="AddSkipVerification" ToolPath="C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin" PublicKeyToken="119b85861667ee6a"/>
        <!-- Remove all SkipVerification -->
        <MSBuild.ExtensionPack.Framework.Signing TaskAction="RemoveAllSkipVerification" ToolPath="C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin"/>
    </Target>
</Project>
See Also

Reference