I’ve migrated from mvc 3 to mvc 4 and encountered with the following problem.
@using InvoiceDocflow.Controllers
@{
Response.ContentType = "text/xml";
}
<?xml version="1.1" encoding="UTF-8" ?>
<dc>
@foreach (var dcLink in (IEnumerable<DcLink>)ViewData["SupportedDcs"])
{
<link rel="@dcLink.RelUri.ToString()" href="@dcLink.DcUri.ToString()" />
}
</dc>
This is my view. My layout is just one line
@RenderBody()
So in mvc 3 <?xml version="1.1" encoding="UTF-8" ?> appeared in the first line, but now, its appears on the second line, leaving th first line empty.

Can I make it render on the first line as it was in mvc 3?
By the way.
@using InvoiceDocflow.Controllers
@{
Response.ContentType = "text/xml";
}<?xml version="1.1" encoding="UTF-8" ?>
This would work, but this is not what I whant to do at all.
Temporary fix? ActionFilter and strip out the empty first line? Clearly you could also do other minification on the response if suitable.
And add it onto the Controller method?