示例#1
0
        public void Store()
        {
            if (projectNameEntry.Text != project.Name)
            {
                ProjectOptionsDialog.RenameItem(project, projectNameEntry.Text);
                if (project.ParentSolution != null)
                {
                    dialog.ModifiedObjects.Add(project.ParentSolution);
                }
            }

            project.Description = projectDescriptionTextView.Buffer.Text;
            if (project is DotNetProject)
            {
                ((DotNetProject)project).DefaultNamespace = projectDefaultNamespaceEntry.Text;
            }

            if (newFilesOnLoadCheckButton.Active)
            {
                project.NewFileSearch = autoInsertNewFilesCheckButton.Active ?  NewFileSearch.OnLoadAutoInsert : NewFileSearch.OnLoad;
            }
            else
            {
                project.NewFileSearch = NewFileSearch.None;
            }
            if (checkSolutionVersion.Active)
            {
                project.SyncVersionWithSolution = true;
            }
            else
            {
                project.SyncVersionWithSolution = false;
                project.Version = entryVersion.Text;
            }
        }
示例#2
0
        public void Store()
        {
            if (projectNameEntry.Text != project.Name)
            {
                ProjectOptionsDialog.RenameItem(project, projectNameEntry.Text);
                if (project.ParentSolution != null)
                {
                    dialog.ModifiedObjects.Add(project.ParentSolution);
                }
            }

            project.Description = projectDescriptionTextView.Buffer.Text;
            if (project is DotNetProject)
            {
                ((DotNetProject)project).DefaultNamespace = projectDefaultNamespaceEntry.Text;
            }
            else if (project is SharedAssetsProject)
            {
                ((SharedAssetsProject)project).DefaultNamespace = projectDefaultNamespaceEntry.Text;
            }

            if (checkSolutionVersion.Active)
            {
                project.SyncVersionWithSolution = true;
            }
            else
            {
                project.SyncVersionWithSolution = false;
                project.Version = entryVersion.Text;
            }
        }
示例#3
0
        public void BuildConsoleProject()
        {
            var current = PropertyService.Get("MonoDevelop.Ide.BuildWithMSBuild", false);

            try
            {
                PropertyService.Set("MonoDevelop.Ide.BuildWithMSBuild", true);

                Solution sol = TestProjectsChecks.CreateConsoleSolution("console-project-msbuild");
                sol.Save(Util.GetMonitor());

                // Ensure the project is buildable
                var result = sol.Build(Util.GetMonitor(), "Debug");
                Assert.AreEqual(0, result.ErrorCount, "#1");

                // Ensure the project is still buildable with xbuild after a rename
                ProjectOptionsDialog.RenameItem(sol.GetAllProjects() [0], "Test");
                result = sol.Build(Util.GetMonitor(), "Release");
                Assert.AreEqual(0, result.ErrorCount, "#2");
            }
            finally
            {
                PropertyService.Set("MonoDevelop.Ide.BuildWithMSBuild", current);
            }
        }
示例#4
0
        public void Store()
        {
            if (projectNameEntry.Text != project.Name)
            {
                ProjectOptionsDialog.RenameItem(project, projectNameEntry.Text);
                if (project.ParentSolution != null)
                {
                    dialog.ModifiedObjects.Add(project.ParentSolution);
                }
            }

            project.Description = projectDescriptionTextView.Buffer.Text;
            if (project is DotNetProject)
            {
                ((DotNetProject)project).DefaultNamespace = projectDefaultNamespaceEntry.Text;

                bool byDefault, require;
                MSBuildProjectService.CheckHandlerUsesMSBuildEngine(project, out byDefault, out require);
                if (!require)
                {
                    var active = msbuildCheck.Active;
                    if (active == byDefault)
                    {
                        project.UseMSBuildEngine = null;
                    }
                    else
                    {
                        project.UseMSBuildEngine = active;
                    }
                }
            }

            if (newFilesOnLoadCheckButton.Active)
            {
                project.NewFileSearch = autoInsertNewFilesCheckButton.Active ?  NewFileSearch.OnLoadAutoInsert : NewFileSearch.OnLoad;
            }
            else
            {
                project.NewFileSearch = NewFileSearch.None;
            }
            if (checkSolutionVersion.Active)
            {
                project.SyncVersionWithSolution = true;
            }
            else
            {
                project.SyncVersionWithSolution = false;
                project.Version = entryVersion.Text;
            }
        }
示例#5
0
        public void BuildConsoleProject()
        {
            Solution sol = TestProjectsChecks.CreateConsoleSolution("console-project-msbuild");

            sol.Save(Util.GetMonitor());

            // Ensure the project is buildable
            var result = sol.Build(Util.GetMonitor(), "Debug");

            Assert.AreEqual(0, result.ErrorCount, "#1");

            // Ensure the project is still buildable with xbuild after a rename
            ProjectOptionsDialog.RenameItem(sol.GetAllProjects() [0], "Test");
            result = sol.Build(Util.GetMonitor(), "Release");
            Assert.AreEqual(0, result.ErrorCount, "#2");
        }