Dark-field X-ray microscopy (DFXM) is a full-field imaging technique that non-destructively maps the structure and local strain inside deeply embedded crystalline elements in three dimensions. In DFXM, an objective lens is placed along the diffracted beam to generate a magnified projection image of the local diffracted volume. This work explores contrast methods and optimizes the DFXM setup specifically for the case of mapping dislocations. Forward projections of detector images are generated using two complementary simulation tools based on geometrical optics and wavefront propagation, respectively. Weak and strong beam contrast and the mapping of strain components are studied. The feasibility of observing dislocations in a wall is elucidated as a function of the distance between neighbouring dislocations and the spatial resolution. Dislocation studies should be feasible with energy band widths of 10-2, of relevance for fourth-generation synchrotron and X-ray free-electron laser sources.