/// <summary> /// Sample for skipping directories // <ItemGroup> // <MsDeploySkipRules Include = "SkippingWWWRoot" > // <ObjectName>dirPath</ ObjectName > // <AbsolutePath>wwwroot</ AbsolutePath > // </MsDeploySkipRules> // </ ItemGroup > /// </summary> void IVSMSDeployHost.UpdateDeploymentBaseOptions(VSMSDeployObject srcVsMsDeployobject, VSMSDeployObject destVsMsDeployobject) { Collections.Generic.List <string> enableSkipDirectiveList = MSDeployUtility.ConvertStringIntoList(EnableSkipDirective); Collections.Generic.List <string> disableSkipDirectiveList = MSDeployUtility.ConvertStringIntoList(DisableSkipDirective); VSHostObject hostObject = new VSHostObject(HostObject as System.Collections.Generic.IEnumerable <Framework.ITaskItem>); Framework.ITaskItem[] srcSkipItems, destSkipsItems; // Add FileSkip rules from Host Object hostObject.GetFileSkips(out srcSkipItems, out destSkipsItems); Utility.AddSkipDirectiveToBaseOptions(srcVsMsDeployobject.BaseOptions, srcSkipItems, enableSkipDirectiveList, disableSkipDirectiveList, Log); Utility.AddSkipDirectiveToBaseOptions(destVsMsDeployobject.BaseOptions, destSkipsItems, enableSkipDirectiveList, disableSkipDirectiveList, Log); //Add CustomSkip Rules + AppDataSkipRules GetCustomAndAppDataSkips(out srcSkipItems, out destSkipsItems); Utility.AddSkipDirectiveToBaseOptions(srcVsMsDeployobject.BaseOptions, srcSkipItems, enableSkipDirectiveList, disableSkipDirectiveList, Log); Utility.AddSkipDirectiveToBaseOptions(destVsMsDeployobject.BaseOptions, destSkipsItems, enableSkipDirectiveList, disableSkipDirectiveList, Log); if (!string.IsNullOrEmpty(DeploymentTraceLevel)) { Diagnostics.TraceLevel deploymentTraceEventLevel = (Diagnostics.TraceLevel)System.Enum.Parse(typeof(Diagnostics.TraceLevel), DeploymentTraceLevel, true); srcVsMsDeployobject.BaseOptions.TraceLevel = deploymentTraceEventLevel; destVsMsDeployobject.BaseOptions.TraceLevel = deploymentTraceEventLevel; } Utility.AddSetParametersFilesVsMsDeployObject(srcVsMsDeployobject, ImportSetParametersItems); Utility.AddSimpleSetParametersVsMsDeployObject(srcVsMsDeployobject, SimpleSetParameterItems, OptimisticParameterDefaultValue); Utility.AddSetParametersVsMsDeployObject(srcVsMsDeployobject, SetParameterItems, OptimisticParameterDefaultValue); AddAdditionalProviderOptions(destVsMsDeployobject); }
void IVSMSDeployHost.UpdateDeploymentBaseOptions(VSMSDeployObject srcVsMsDeployobject, VSMSDeployObject destVsMsDeployobject) { Collections.Generic.List <string> enableSkipDirectiveList = MSDeployUtility.ConvertStringIntoList(EnableSkipDirective); Collections.Generic.List <string> disableSkipDirectiveList = MSDeployUtility.ConvertStringIntoList(DisableSkipDirective); MsDeploy.Utility.AddSkipDirectiveToBaseOptions(srcVsMsDeployobject.BaseOptions, null, enableSkipDirectiveList, disableSkipDirectiveList, Log); MsDeploy.Utility.AddSkipDirectiveToBaseOptions(destVsMsDeployobject.BaseOptions, null, enableSkipDirectiveList, disableSkipDirectiveList, Log); if (!string.IsNullOrEmpty(DeploymentTraceLevel)) { Diagnostics.TraceLevel deploymentTraceEventLevel = (Diagnostics.TraceLevel)System.Enum.Parse(typeof(Diagnostics.TraceLevel), DeploymentTraceLevel, true); srcVsMsDeployobject.BaseOptions.TraceLevel = deploymentTraceEventLevel; destVsMsDeployobject.BaseOptions.TraceLevel = deploymentTraceEventLevel; } MsDeploy.Utility.AddSetParametersFilesVsMsDeployObject(srcVsMsDeployobject, ImportSetParametersItems); MsDeploy.Utility.AddSimpleSetParametersVsMsDeployObject(srcVsMsDeployobject, SimpleSetParameterItems, OptimisticParameterDefaultValue); MsDeploy.Utility.AddSetParametersVsMsDeployObject(srcVsMsDeployobject, SetParameterItems, OptimisticParameterDefaultValue); AddAdditionalProviderOptions(destVsMsDeployobject); }