public static Solution CreateSolution( string fileName = null, IEnumerable <Solution> solutions = null, Func <Solution, string> folderNameProvider = null, bool randomizeProjectIds = true) { ControlFlow.Assert(folderNameProvider != null || solutions != null, "folderNameProvider != null || solutions!= null"); var solution = SolutionSerializer.Deserialize( new[] { "Microsoft Visual Studio Solution File, Format Version 12.00", "# Visual Studio 15", "VisualStudioVersion = 15.0.26124.0", "MinimumVisualStudioVersion = 15.0.26124.0" }, fileName); solution.Configurations = new Dictionary <string, string> { { "Debug|Any CPU", "Debug|Any CPU" }, { "Release|Any CPU", "Release|Any CPU" } }; solutions?.ForEach(x => { var folder = folderNameProvider != null && folderNameProvider(x) is { } folderName ? solution.AddSolutionFolder(folderName) : null; solution.AddSolution(x, folder); if (randomizeProjectIds) { solution.RandomizeProjectIds(); } }); return(solution); }
public void Save() { SolutionSerializer.Serialize(this); }
public static Solution ParseSolution(string solutionFile) { return SolutionSerializer.Deserialize(solutionFile); }
public static Solution ParseSolution(string solutionFile) { return(SolutionSerializer.DeserializeFromFile <Solution>(solutionFile)); }