Exemplo n.º 1
0
        protected override string GenerateCommandLineCommands()
        {
            CommandLineBuilder builder = new CommandLineBuilder();
            builder.AppendSwitch("pack");

            if (!File.Exists(this.Target))
            {
                throw new FileNotFoundException(string.Format("The file '{0}' could not be found.", this.Target), this.Target);
            }

            builder.AppendFileNameIfNotNull(this.Target);
            builder.AppendSwitchIfTrue("-Symbols", this.Symbols);
            builder.AppendSwitchIfTrue("-NoDefaultExcludes", this.NoDefaultExcludes);
            builder.AppendSwitchIfTrue("-NoPackageAnalysis", this.NoPackageAnalysis);
            builder.AppendSwitchIfTrue("-ExcludeEmptyDirectories", this.ExcludeEmptyDirectories);
            builder.AppendSwitchIfTrue("-IncludeReferencedProjects", this.IncludeReferencedProjects);
            builder.AppendSwitchIfNotNull("-Version ", this.Version);
            builder.AppendSwitchIfNotNull("-Properties ", this.Properties, ";");
            builder.AppendSwitchIfNotNull("-Exclude ", this.Excluded, ";");
            builder.AppendSwitchIfNotNull("-MinClientVersion ", this.MinClientVersion);
            builder.AppendSwitchIfNotNull("-BasePath ", this.BasePath);
            builder.AppendSwitchIfNotNull("-OutputDirectory ", this.OutputDirectory);
            builder.AppendSwitchIfNotNull("-Verbosity ", this.Verbosity);
            builder.AppendSwitch("-NonInteractive ");
            builder.AppendTextUnquotedIfNotNullOrEmpty(this.CustomSwitches);

            return builder.ToString();
        }