Heteroepitaxial nonpolar and semipolar III-nitride films contain numerous structural defects which prevent their use for the development of efficient optoelectronic devices. After a description of the microstructure of such films, this paper reviews the different techniques which have been developed to reduce the densities of the different types of defects. The choice of a well-adapted substrate is discussed. The effect of the introduction of an interlayer is reported. Then, techniques based on the introduction of a 3D growth stage are evaluated. Finally, the original methods based on the growth on inclined facets are described and assessed.