  The on-demand preparation of higher-order Fock states is of fundamental
importance in quantum information sciences. We propose and compare different
protocols to generate higher-order Fock states in solid state
quantum-dot--cavity systems. The protocols make use of a series of laser pulses
to excite the quantum dot exciton and off-resonant pulses to control the
detuning between dot and cavity. Our theoretical studies include dot and cavity
loss processes as well as the pure-dephasing type coupling to longitudinal
acoustic phonons in a numerically complete fashion. By going beyond the
two-level approximation for quantum dots, we study the impact of a finite
exchange splitting, the impact of a higher energetic exciton state, and an
excitation with linearly polarized laser pulses leading to detrimental
occupations of the biexciton state. We predict that under realistic conditions,
a protocol which keeps the cavity at resonance with the quantum dot until the
desired target state is reached is able to deliver fidelities to the Fock state
$| 5\rangle$ well above $40\,\%$.
