The possibility of growing lattice-mismatched layers and quantum wells becomes more and more interesting for the fabrication of devices. For device performance it is necessary to control the formation of misfit dislocations within the mismatched layers. It is therefore essential to study the onset of misfit dislocations versus amount of mismatch and layer thickness. A preliminary cathodoluminescence (CL) investigation, performed on layers of GaAsxP1−x mismatched to GaP barriers, was presented [A. Gustafsson, J. Jönsson, M. Gerling, M. R. Leys, M.-E. Pistol, L. Samuelson, and H. Titze, Inst. Phys. Conf. Ser. No 100, 771 (1989)]. In this paper the critical thickness with respect to the composition, x, in GaAsxP1−x, is studied from a determination of the onset of the formation of dislocations as observed in the monochromatic CL images. The experimental values of the critical thickness are compared to theoretical predictions for the critical thickness, according to different theories. The best agreement is found with the mechanical equilibrium theory, which assumes that the barrier for the formation of dislocations is negligible.