title: Cannot create documents with Open XML SDK
body: <p>I'm learning to use the Open XML SDK with Visual Studio Community 2015. I tried to create a document by following the example here: <a href="https://msdn.microsoft.com/en-us/library/dd440953(v=office.12).aspx" rel="nofollow">https://msdn.microsoft.com/en-us/library/dd440953(v=office.12).aspx</a></p>
  
  <p>My code:</p>
  
  <pre><code>using DocumentFormat.OpenXml;
  using DocumentFormat.OpenXml.Packaging;
  using DocumentFormat.OpenXml.Wordprocessing;
  
  namespace ConsoleApplication1
  {
      class Program
      {
          static void Main(string[] args)
          {
            Program p = new Program();
            p.HelloWorld("abc.docx");
          }
  
          public void HelloWorld(string docName)
          {
              // Create a Wordprocessing document. 
              using (WordprocessingDocument package = WordprocessingDocument.Create(docName, WordprocessingDocumentType.Document))
              {
                  // Add a new main document part. 
                  package.AddMainDocumentPart();
  
                  // Create the Document DOM. 
                  package.MainDocumentPart.Document =
                    new Document(
                      new Body(
                        new Paragraph(
                          new Run(
                            new Text("Hello World!")))));
  
                  // Save changes to the main document part. 
                  package.MainDocumentPart.Document.Save();
              }
          }
  
      }
  }
  </code></pre>
  
  <p>I got an error on <code>WordprocessingDocument.Create</code>:</p>
  
  <pre><code>Error   CS0012  The type 'Package' is defined in an assembly that is not referenced. 
  You must add a reference to assembly 'WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=1234'.  
  ConsoleApplication1 c:\users\john\documents\visual studio 2015\Projects\ConsoleApplication1\ConsoleApplication1\Program.cs
  </code></pre>
  
  <p>I've already installed the <code>DocumentFormat.OpenXml</code> package with nuget</p>
  
  <p>What is wrong with the code?</p>