title: Roslyn CTP - How to Write Changes To File System
body: <p>I created an empty Visual Studio Solution called Solution.sln which I load into the workspace int the first line.  Then I add a project to the solution, and update the workspace to the latest solution which should now contain a project.  How do I write out the files for the new stuff I added to the empty solution?</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using Roslyn.Compilers;
  using Roslyn.Compilers.CSharp;
  using Roslyn.Services;
  
  namespace RoslynMainApp 
  {
      class Program 
      {
          static void Main(string[] args) 
          {
              IWorkspace workspace = Workspace.LoadSolution(@"C:\RoslynSolutions\Solution.sln");
              ProjectId projectId;
  
              ISolution solution = Solution.Create(SolutionId.CreateNewId("Solution"));
              solution.AddCSharpProject("Project1.dll", "Project1", out projectId);
              var success = workspace.ApplyChanges(workspace.CurrentSolution, solution); 
              if(success)
              {
                  //How do I write out all the stuff I just added to Solution.sln to the directory RoslynSolutions?
              }
          }
      }
  }
  </code></pre>
  
  <p>Thanks in advance,</p>
  
  <p>Bob</p>