The design problem for semiconductor devices is studied via an optimal control approach for the standard drift–diffusion model. The solvability of the minimization problem is proved. The first-order optimality system is derived and the existence of Lagrange-multipliers is established. Further, estimates on the sensitivities are given. Numerical results concerning a symmetric n–p-diode are presented.