The building collapsed at 9:40 a.m. (0140 GMT) on Saturday in Xiangfen county in the southwest of Shanxi, the Ministry of Emergency Management said in a statement.
The accident in the two-story structure occurred as villagers and relatives gathered for a birthday party, and the rescue operation ended early on Sunday, state media said.
Fifty-seven people were pulled from the debris, with 29 confirmed dead, while 21 suffered minor injuries.The Shanxi provincial government has set up a high-level team to investigate the accident in the county, which is under the jurisdiction of the city of Linfen, the emergency management ministry said.