title: ASP.NET Core 1.0 Web API doesn't return XML
body: <p>How can I have my vnext API to return XML and JSON ?</p>
  
  <p>I thought that using content-type with application/xml would work as it was before.
  Note that I tryed with Accept : application/xml too.</p>
  
  <p>But it seems not.</p>
  
  <p>EDIT :</p>
  
  <p>this is my project.json file :</p>
  
  <pre><code>{
    "webroot": "wwwroot",
    "version": "1.0.0-*",
  
    "dependencies": {
      "Microsoft.AspNet.Server.IIS": "1.0.0-beta4",
      "Microsoft.AspNet.Server.WebListener": "1.0.0-beta4",
      "Microsoft.AspNet.Mvc": "6.0.0-beta4",
      "Microsoft.AspNet.Mvc.Xml": "6.0.0-beta4"
    },
  
    "commands": {
        "web": "Microsoft.AspNet.Hosting --server     Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5000"
    },
  
    "frameworks": {
      "dnx451": { },
      "dnxcore50": { }
    },
  
    "publishExclude": [
      "node_modules",
      "bower_components",
      "**.xproj",
      "**.user",
      "**.vspscc"
    ],
    "exclude": [
      "wwwroot",
      "node_modules",
      "bower_components"
    ]
  }
  </code></pre>
  
  <p>this is my startup.cs :</p>
  
  <pre><code>public class Startup
  {
      // For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=398940
      public void ConfigureServices(IServiceCollection services)
      {
          services.ConfigureMvc(options =&gt;
          {
              //options.AddXmlDataContractSerializerFormatter();
  
              options.InputFormatters.Add(new XmlSerializerInputFormatter());
              options.OutputFormatters.Add(new XmlSerializerOutputFormatter());
          });
          services.AddMvc();
      }
  
      public void Configure(IApplicationBuilder app)
      {
          app.UseMvc();
      }
  }
  </code></pre>