protected override void ProcessRecord() { base.ProcessRecord(); Logger.LogVerbose("Entering XrmExportSolution"); XrmConnectionManager xrmConnection = new XrmConnectionManager( Logger); SolutionManager solutionManager = new SolutionManager( Logger, OrganizationService, null); SolutionExportOptions options = new SolutionExportOptions { Managed = Managed, SolutionName = UniqueSolutionName, ExportAutoNumberingSettings = ExportAutoNumberingSettings, ExportCalendarSettings = ExportCalendarSettings, ExportCustomizationSettings = ExportCustomizationSettings, ExportEmailTrackingSettings = ExportEmailTrackingSettings, ExportGeneralSettings = ExportGeneralSettings, ExportIsvConfig = ExportIsvConfig, ExportMarketingSettings = ExportMarketingSettings, ExportOutlookSynchronizationSettings = ExportOutlookSynchronizationSettings, ExportRelationshipRoles = ExportRelationshipRoles, ExportSales = ExportSales, TargetVersion = TargetVersion, ExportExternalApplications = ExportExternalApplications, IncludeVersionInName = IncludeVersionInName, ExportAsync = ExportAsync, AsyncWaitTimeout = AsyncWaitTimeout, SleepInterval = SleepInterval }; string solutionFile = solutionManager.ExportSolution( OutputFolder, options); base.WriteObject(solutionFile); Logger.LogVerbose("Leaving XrmExportSolution"); }