Exemple #1
0
        public override ActionBase CreateFromForm()
        {
            var buildAction = new BuildMSBuildProjectAction
            {
                ProjectBuildConfiguration = Util.NullIf(this.txtProjectBuildConfiguration.Text, string.Empty),
                ProjectTargetPlatform     = Util.NullIf(this.txtProjectBuildTargetPlatform.Text, string.Empty),
                AdditionalArguments       = Util.NullIf(this.txtAdditionalArguments.Text, string.Empty),
                IsWebProject = this.chkWebProject.Checked
            };

            if (SeparateOverriddenSourceDirectory(this.txtProjectPath.Text, this.txtTargetDir.Text))
            {
                buildAction.OverriddenSourceDirectory = Path.GetDirectoryName(this.txtProjectPath.Text);
                buildAction.ProjectPath = Path.GetFileName(this.txtProjectPath.Text);
            }
            else
            {
                buildAction.ProjectPath = this.txtProjectPath.Text;
            }

            buildAction.MSBuildProperties = this.txtAdditionalProperties.Text;

            if (this.ddlBuildOutputDir.SelectedValue == "bin" && !this.chkWebProject.Checked)
            {
                buildAction.BuildToProjectConfigSubdirectories = true;
                buildAction.OverriddenTargetDirectory          = string.Empty;
            }
            else
            {
                buildAction.BuildToProjectConfigSubdirectories = false;
                buildAction.OverriddenTargetDirectory          = this.txtTargetDir.Text;
            }

            return(buildAction);
        }
        public override ActionBase CreateFromForm()
        {
            EnsureChildControls();

            var buildAction = new BuildMSBuildProjectAction();

            if (ddlProjectBuildConfiguration.SelectedValue != "Other")
                buildAction.ProjectBuildConfiguration = this.ddlProjectBuildConfiguration.SelectedValue;
            else
                buildAction.ProjectBuildConfiguration = this.txtOtherConfig.Text;

            if (ddlProjectBuildTargetPlatform.SelectedValue != "Other")
                buildAction.ProjectTargetPlatform = this.ddlProjectBuildTargetPlatform.SelectedValue;
            else
                buildAction.ProjectTargetPlatform = this.txtOtherPlatform.Text;

            if (SeparateOverriddenSourceDirectory(this.txtProjectPath.Text, this.txtTargetDir.Text))
            {
                buildAction.OverriddenSourceDirectory = Path.GetDirectoryName(this.txtProjectPath.Text);
                buildAction.ProjectPath = Path.GetFileName(this.txtProjectPath.Text);
            }
            else
            {
                buildAction.ProjectPath = this.txtProjectPath.Text;
            }

            buildAction.IsWebProject = this.chkWebProject.Checked;
            buildAction.DotNetVersion = this.ddlVersion.SelectedValue;
            buildAction.MSBuildProperties = this.txtAdditionalProperties.Text;

            if (this.ddlBuildOutputDir.SelectedValue == "bin" && !this.chkWebProject.Checked)
            {
                buildAction.BuildToProjectConfigSubdirectories = true;
                buildAction.OverriddenTargetDirectory = "";
            }
            else
            {
                buildAction.BuildToProjectConfigSubdirectories = false;
                buildAction.OverriddenTargetDirectory = this.txtTargetDir.Text;
            }

            return buildAction;
        }
        public override ActionBase CreateFromForm()
        {
            var buildAction = new BuildMSBuildProjectAction
            {
                ProjectBuildConfiguration = Util.NullIf(this.txtProjectBuildConfiguration.Text, string.Empty),
                ProjectTargetPlatform = Util.NullIf(this.txtProjectBuildTargetPlatform.Text, string.Empty),
                AdditionalArguments = Util.NullIf(this.txtAdditionalArguments.Text, string.Empty),
                IsWebProject = this.chkWebProject.Checked
            };

            if (SeparateOverriddenSourceDirectory(this.txtProjectPath.Text, this.txtTargetDir.Text))
            {
                buildAction.OverriddenSourceDirectory = Path.GetDirectoryName(this.txtProjectPath.Text);
                buildAction.ProjectPath = Path.GetFileName(this.txtProjectPath.Text);
            }
            else
            {
                buildAction.ProjectPath = this.txtProjectPath.Text;
            }

            buildAction.MSBuildProperties = this.txtAdditionalProperties.Text;

            if (this.ddlBuildOutputDir.SelectedValue == "bin" && !this.chkWebProject.Checked)
            {
                buildAction.BuildToProjectConfigSubdirectories = true;
                buildAction.OverriddenTargetDirectory = string.Empty;
            }
            else
            {
                buildAction.BuildToProjectConfigSubdirectories = false;
                buildAction.OverriddenTargetDirectory = this.txtTargetDir.Text;
            }

            return buildAction;
        }