/// <summary> /// Loads the snippet project or creates one if it does not already exist. /// </summary> static void CreateSnippetProject() { string fileName = SnippetProjectFileName; if (!File.Exists(fileName)) { // Add single snippet file to project. SnippetCompilerProject project = new SnippetCompilerProject(); FileProjectItem item = new FileProjectItem(project, ItemType.Compile, "Snippet.cs"); ProjectService.AddProjectItem(project, item); project.Save(fileName); } }
/// <summary> /// Loads the snippet project or creates one if it does not already exist. /// </summary> private static void CreateSnippetProject() { string fileName = SnippetProjectFileName; if (!File.Exists(fileName)) { // Add single snippet file to project. var project = new SnippetCompilerProject(); var item = new FileProjectItem(project, ItemType.Compile, "Snippet.cs"); ProjectService.AddProjectItem(project, item); project.Save(); solution.Items.Add(project); solution.Save(); } }