Solution Class

MSBuild Extension Pack

Solution Class MSBuild Extension Pack Help 4.0.12.0
Valid TaskActions are:

Import (Required: OrganizationUrl, Name, Extension Optional: Path, OverwriteCustomizations, EnableSDKProcessingSteps, ConnectionTimeout)

Export (Required: OrganizationUrl, Name, Extension Optional: Path, ExportAsManagedSolution, ConnectionTimeout)

GetVersion (Required: OrganizationUrl Optional: ConnectionTimeout)

SetVersion (Required: OrganizationUrl, Version Optional ConnectionTimeout)

Inheritance Hierarchy

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

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

The Solution type exposes the following members.

Constructors

  NameDescription
Public methodSolution
Top
Properties

  NameDescription
Public propertyConnectionTimeout
Gets or sets the timeout in minutes for connecting to Crm Service. Default is 3 minutes.
Public propertyEnableSdkProcessingSteps
Sets whether to enable any SDK message processing steps included in the Solution. Default is true.
Public propertyExportAsManagedSolution
Sets whether the Solution to be exported as a managed Solution. Default is true.
Public propertyExtension
Sets the extension of the Solution file for import or export.
Public propertyName
Sets the Name of the Solution. While exporting the Solution file will be named same as the Solution's name.
Public propertyOrganizationUrl
Sets the Url of the Organization, where the Solution is imported to.
Public propertyOverwriteCustomizations
Sets whether to overwrite any unmanaged customizations or not. Default is true.
Public propertyPath
Sets the directory path where the Solution is imported or exported to. If a path is not set, the file is read or written from the MSBuild script's directory path.
Public propertyVersion
Sets the Version of the Solution.
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">
        <!-- Import a Solution to the given Organization -->
        <MSBuild.ExtensionPack.Crm.Solution TaskAction="Import" OrganizationUrl="http://crm/organization1" Name="CrmSolution" Path="C:\Solutions" Extension="zip" OverwriteCustomizations="true" EnableSDKProcessingSteps="True" />
    </Target>
    <Target Name="Export">
        <!-- Export a Solution as an managed or unmanaged Solution to a solution file-->
        <MSBuild.ExtensionPack.Crm.Solution TaskAction="Export" OrganizationUrl="http://crm/organization1" Name="CrmSolution" OverwriteCustomizations="true" EnableSDKProcessingSteps="True" />
    </Target>
    <Target Name="GetVersion">
        <!-- GetVersion for a Solution -->
        <MSBuild.ExtensionPack.Crm.Solution TaskAction="GetVersion" OrganizationUrl="http://crm/organization1" Name="CrmSolution">
            <Output TaskParameter="Version" PropertyName="CrmSolutionVersionNumber" /> 
        </MSBuild.ExtensionPack.Crm.Solution>
    </Target>
</Project>
See Also

Reference