SecurityUtilities.SignFile Method (String, Uri, String, String)

Signs a ClickOnce manifest or PE file. This overload is new as of Visual Studio 2013 Update 3. This overload allows you to specify the target framework version for the file. You are encouraged to use this overload wherever possible, because the MSBuild process uses SHA256 hashes only when the target framework is .NET 4.5 or higher. If the target framework is .NET 4.0 or below, the SHA256 hash will not be used.

MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

Namespace:  Microsoft.Build.Tasks.Deployment.ManifestUtilities
Assembly:  Microsoft.Build.Tasks.Core (in Microsoft.Build.Tasks.Core.dll)

Syntax

'Declaration
Public Shared Sub SignFile ( _
    certThumbprint As String, _
    timestampUrl As Uri, _
    path As String, _
    targetFrameworkVersion As String _
)
public static void SignFile(
    string certThumbprint,
    Uri timestampUrl,
    string path,
    string targetFrameworkVersion
)
public:
static void SignFile(
    String^ certThumbprint, 
    Uri^ timestampUrl, 
    String^ path, 
    String^ targetFrameworkVersion
)
static member SignFile : 
        certThumbprint:string * 
        timestampUrl:Uri * 
        path:string * 
        targetFrameworkVersion:string -> unit
public static function SignFile(
    certThumbprint : String, 
    timestampUrl : Uri, 
    path : String, 
    targetFrameworkVersion : String
)

Parameters

  • certThumbprint
    Type: System.String

    A hexadecimal string that contains the SHA-1 hash of the certificate.

  • timestampUrl
    Type: System.Uri

    The URL of a time stamping server

  • targetFrameworkVersion
    Type: System.String

    The .NET Framework version of the target.

.NET Framework Security

See Also

Reference

SecurityUtilities Class

SignFile Overload

Microsoft.Build.Tasks.Deployment.ManifestUtilities Namespace