title: Generate a class from xsd file in net core
body: <p>I need to generate a class from an xsd in net core. 
  In dotnet standard I used commandline <code>xsd filename.xsd /c.</code> 
  But how to I create this class in net core. 
  Anyone knows how to do this?</p>
  
  <p>When I add a class generated with xsd.exe I get several errors. </p>
  
  <p>Example </p>
  
  <pre><code>    Error   CS0234  The type or namespace name 'SerializableAttributeAttribute' does not exist in the namespace 'System' (are you missing an assembly reference?)
  
  
  Error   CS0234  The type or namespace name 'DesignerCategoryAttribute' does not exist in the namespace 'System.ComponentModel' (are you missing an assembly reference?) 
  
  Error   CS0234  The type or namespace name 'XmlTypeAttributeAttribute' does not exist in the namespace 'System.Xml.Serialization' (are you missing an assembly reference?)
  
  Error   CS0246  The type or namespace name 'AnonymousType' could not be found (are you missing a using directive or an assembly reference?) 
  </code></pre>
  
  <p>Attributes from a class in autogen file</p>
  
  <pre><code>[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
  [System.SerializableAttribute()]
  [System.Diagnostics.DebuggerStepThroughAttribute()]
  [System.ComponentModel.DesignerCategoryAttribute("code")]
  [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
  </code></pre>