static void CreateSolution(string fullcsprojPath, string fullslnPath)
 {
     try
     {
         var slnName = Path.GetFileNameWithoutExtension(fullslnPath);
         var slnPath = Path.GetDirectoryName(fullslnPath);
         solutionObject.Create(slnPath, slnName);
         solutionObject.AddFromFile(fullcsprojPath);
         solutionObject.SaveAs(fullslnPath);
         LogToConsole("SAVED " + fullslnPath + " OK", false);
     }
     catch (Exception e)
     {
         LogToConsole(Environment.NewLine + "FAILED " + fullcsprojPath, true);
         LogToConsole(e.Message + Environment.NewLine, true);
     }
 }
Example #2
0
 public void Save()
 {
     Directory.CreateDirectory(DirectoryName);
     IntegrationHelper.RetryRpcCall(() => _dteSolution.SaveAs(FileName));
 }