The majority of eukaryotic secretory and membrane proteins contain disulfide bonds, which are strongly conserved within protein families because of their crucial role in folding or function. The exact role of these disulfide bonds during folding is unclear. Using virus-driven evolution we generated a viral glycoprotein variant, which is functional despite the lack of an absolutely conserved disulfide bond that links two antiparallel beta-strands in a six-stranded beta-barrel. Molecular dynamics simulations revealed that improved hydrogen bonding and side chain packing led to stabilization of the beta-barrel fold, implying that beta-sheet preference codirects glycoprotein folding in vivo. Our results show that the interactions between two beta-strands that are important for the formation and/or integrity of the beta-barrel can be supported by either a disulfide bond or beta-sheet favoring residues.