protected override void Execute(CodeActivityContext context) { #region Extract Workflow Argument Values // The file path of the nuget.exe - if null or empty then // assume nuget is "installed" on the build server and in the path var nuGetExeFilePath = NuGetExeFilePath.Get(context); // The path of the nuspec file var nuSpecFilePath = NuSpecFilePath.Get(context); // The folder location of the files to be packed var basePath = BasePath.Get(context); // The folder location of the files to be packed var outputDirectory = OutputDirectory.Get(context); // The destination location if deployment is to be done var versionNumber = VersionNumber.Get(context); // command line options to append (as is) to the nuget command line var additionalOptions = AdditionalOptions.Get(context); #endregion context.WriteBuildMessage(string.Format("In CallNuGetPackageCommandLine:"), BuildMessageImportance.High); context.WriteBuildMessage(string.Format("nuGetExeFilePath: {0}", nuGetExeFilePath), BuildMessageImportance.High); context.WriteBuildMessage(string.Format("basePath: {0}", basePath), BuildMessageImportance.High); context.WriteBuildMessage(string.Format("outputDirectory: {0}", outputDirectory), BuildMessageImportance.High); context.WriteBuildMessage(string.Format("versionNumber: {0}", versionNumber), BuildMessageImportance.High); context.WriteBuildMessage(string.Format("additionalOptions: {0}", additionalOptions), BuildMessageImportance.High); // Don't assume that DI will have happened. If the value is null then create the default object.);) if (NuGetProcess == null) { NuGetProcess = new NuGetProcess(); } // Call the method that will do the work var results = NuGetPackaging(nuGetExeFilePath, nuSpecFilePath, outputDirectory, basePath, versionNumber, additionalOptions, context); // Send the result back to the workflow NuGetPackagingResult.Set(context, results); }