本文整理汇总了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();
}
示例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);
}
}