SolutionPackage.Generate Method (X509Certificate2, String)
Generates the package and signs it with the given certificate.
Namespace: Microsoft.Office.SharePoint.ClientExtensions.Publishing
Assembly: Microsoft.Office.SharePoint.ClientExtensions (in Microsoft.Office.SharePoint.ClientExtensions.dll)
Syntax
'Declaration
Public Function Generate ( _
cert As X509Certificate2, _
targetDocLibRelativePath As String _
) As String
'Usage
Dim instance As SolutionPackage
Dim cert As X509Certificate2
Dim targetDocLibRelativePath As String
Dim returnValue As String
returnValue = instance.Generate(cert, _
targetDocLibRelativePath)
public string Generate(
X509Certificate2 cert,
string targetDocLibRelativePath
)
Parameters
cert
Type: System.Security.Cryptography.X509Certificates.X509Certificate2The X509 certificate used to sign the package.
targetDocLibRelativePath
Type: System.StringThe path of the document library where the package should be published. This path is relative to the site URL.
Return Value
Type: System.String
The solution package URL string.
Exceptions
Exception | Condition |
---|---|
PublishException | This exception is thrown if any of the following conditions applies:
|
Examples
Code Snippet: Create a BCS Solution Package for a Declarative Solution
See Also
Reference
Microsoft.Office.SharePoint.ClientExtensions.Publishing Namespace