place the corn on a large tray and wrap with foil (or wrap each cob in a foil parcel). roast the corn in the oven for around 35-40 minutes, turning halfway. for slightly more "charred" corn, remove the foil at the end of the baking time and broil until lightly charred, turning as needed.