The optical second-harmonic generation from a thin crystalline film on a substrate is theoretically investigated for both s and p polarized incident light. The contributions of lattice misfit strain as well as of misfit dislocation strain to the second-order nonlinear optical susceptibility are described using a nonlinear photoelastic tensor and can be separated by a polarization analysis of the scattered light at the second harmonic frequency. For the s(omega)--> s(2 omega) and p(omega)--> s(2 omega) scattering geometries, the nonlinear optical signal will be determined by dislocation strain only, whereas for the s(omega)--> p(2 omega) and p(omega)--> p(2 omega) geometries both lattice misfit strain and misfit dislocation strain will contribute. (C) 2000 American Institute of Physics. [S0003-6951(00)01814-3].