当前位置: 首页>>代码示例>>C#>>正文


C# Solution.SaveAs方法代码示例

本文整理汇总了C#中Solution.SaveAs方法的典型用法代码示例。如果您正苦于以下问题:C# Solution.SaveAs方法的具体用法?C# Solution.SaveAs怎么用?C# Solution.SaveAs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Solution的用法示例。


在下文中一共展示了Solution.SaveAs方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RunFinished

        public void RunFinished()
        {
            _solution = _dte.Solution;
            _solution.SaveAs((string)_solution.Properties.Item("Path").Value);

            ExtractSolutionItems();
            MoveProjects();
            AddImportTargets();
            SetupConfigurationManager();
            SetProjectReferences();
        }
开发者ID:jrgcubano,项目名称:zetbox,代码行数:11,代码来源:SolutionWizard.cs

示例2: RunFinished

        public void RunFinished()
        {
            try
            {
                _solution = _dte.Solution;

                var solutionFile = (string)_solution.Properties.Item("Path").Value;
                _solution.SaveAs(solutionFile);

                ExtractSolutionItems();
                MoveProjects();
                AddImportTargets();
                SetupConfigurationManager();
                SetProjectReferences();
                SetStartupProject();

                foreach (Project prj in _solution.Projects)
                {
                    prj.Save();
                }
                _solution.SaveAs(solutionFile);

                _shell.Execute(".nuget\\nuget.exe", "sources add -name dasz -source https://office.dasz.at/ngf/api/v2/");

                if (MessageBox.Show("Template created successfully. To finish project setup, zbResetAll.cmd must be executed.\n\nExecute now?", "Templated created", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    _shell.ExecuteAsync("ZbResetAll.cmd");
                }
            }
            catch (Exception ex)
            {
                var sb = new StringBuilder();

                sb.AppendLine("A error occured during creation of the solution. It is STRONGLY recomended to delete the solution and re-create it!");
                sb.AppendLine();
                sb.Append(ex.ToString());

                _messages.WriteLine(sb.ToString());
                MessageBox.Show(sb.ToString(), "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
开发者ID:daszat,项目名称:zetbox,代码行数:41,代码来源:SolutionWizard.cs


注:本文中的Solution.SaveAs方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。