Mayer's method for the expansion of the partition function of a gas is adapted to the calculation of the partition function of a binary solid solution. The partition function is expanded in powers of the atomic fraction. Singularities in this expansion correspond to a phase transition. The singularity can be calculated in the simplest case of a binary solution with a two-phase region. This case is treated in full; the limits of solubility and the specific heat are obtained. The latter is discontinuous at the phase boundaries.