SecurityUtilities.SignFile Method (String, SecureString, Uri, String)
Signs a ClickOnce manifest.
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 ( _
certPath As String, _
certPassword As SecureString, _
timestampUrl As Uri, _
path As String _
)
public static void SignFile(
string certPath,
SecureString certPassword,
Uri timestampUrl,
string path
)
public:
static void SignFile(
String^ certPath,
SecureString^ certPassword,
Uri^ timestampUrl,
String^ path
)
static member SignFile :
certPath:string *
certPassword:SecureString *
timestampUrl:Uri *
path:string -> unit
public static function SignFile(
certPath : String,
certPassword : SecureString,
timestampUrl : Uri,
path : String
)
Parameters
certPath
Type: System.StringThe certificate to be used to sign the file. The certificate must contain a private key. The KeyUsage extension is optional, but if it is present, DigitalSignature must be set to True. The EnhancedKeyUsage extension is also optional, but if it is present, the certificate must contain object identifier (OID) support.
certPassword
Type: SecureStringThe certificate password.
timestampUrl
Type: System.UriIndicates that the file is to be timestamped by the timestamp server at the specified HTTP address. This parameter can be NULL if you do not want a timestamp.
path
Type: System.StringThe name of the file to sign.
Remarks
This function is only for signing a manifest, not a PE file.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.
See Also
Reference
Microsoft.Build.Tasks.Deployment.ManifestUtilities Namespace