Shearing stresses can change the volume of a material via a nonlinear effect known as shear dilatancy. We calculate the elastic dilatancy coefficient of soft sphere packings and random spring networks, two canonical models of marginal solids close to their rigidity transition. We predict a dramatic enhancement of dilatancy near rigidity loss in both materials, with a surprising distinction: while packings expand under shear, networks contract. We show that contraction in networks is due to the destabilizing influence of increasing hydrostatic or uniaxial loads, which is counteracted in packings by the formation of new contacts.