MsDeployAliases.

MsDeploy(ICakeContext, MsDeploySettings) Method

Summary

Executes an MsDeploy operation for the given source, destination (optional), and operation settings.
Assembly
Cake.MsDeploy.dll
Namespace
Cake.MsDeploy
Containing Type
MsDeployAliases

Syntax

public static void MsDeploy(this ICakeContext context, MsDeploySettings settings)

Examples

     var settings = new MsDeploySettings
     {
         Verb = Operation.Sync,
         RetryAttempts = 5,
         RetryInterval = 5000,
         Source = new PackageProvider
         {
             Direction = Direction.source,
             Path = MakeAbsolute(File("./artifacts/Application.zip")).ToString()
         },
         Destination = new AutoProvider
         {
             Direction = Direction.dest,
             IncludeAcls = false,
             AuthenticationType = AuthenticationScheme.NTLM,
             ComputerName = "cake.computerName.com",
             TempAgent = true
          },
          AllowUntrusted = true,
          PreSyncCommand = "%windir%\\System32\\inetsrv\\appcmd.exe stop APPPOOL NameOfAppPool",
          PostSyncCommand = "%windir%\\System32\\inetsrv\\appcmd.exe start APPPOOL NameOfAppPool",
          WhatIf = true,
          SetParams = new List<SetParameter>
          {
             new SetParameter
             {
                 Name = "IIS Web Application Name",
                 Value = "www.cake.com"
             }
          }
      };

     MsDeploy(settings);

Attributes

Type Description
CakeMethodAliasAttribute

Parameters

Name Type Description
context ICakeContext The context.
settings MsDeploySettings The MSDeploy settings

Return Value

Type Description
void