The Millennium Gas Project aims to undertake smoothed particle hydrodynamic resimulations of the millennium simulation, providing many hundred massive galaxy clusters for comparison with X-ray surveys (170 clusters with kTsl > 3 keV). This paper looks at the hot gas and stellar fractions of clusters in simulations with different physical heating mechanisms. These fail to reproduce cool-core systems but are successful in matching the hot gas profiles of non-cool-core clusters. Although there is immense scatter in the observational data, the simulated clusters broadly match the integrated gas fractions within r500. In line with previous work, however, they fare much less well when compared to the stellar fractions, having a dependence on cluster mass that is much weaker than is observed. The evolution with redshift of the hot gas fraction is much larger in the simulation with early pre-heating than in one with continual feedback; observations favour the latter model. The strong dependence of hot gas fraction on cluster physics limits its use as a probe of cosmological parameters.