Some armed forces housing remains in an "appalling condition" and could take decades to be brought up to scratch, according to a report by MPs.
New barracks accommodation is "first rate", said the MPs
It warns the Ministry of Defence not to take money from the housing budget at times of financial pressure.
It adds that the "disgraceful" accommodation is fuelling problems with military recruitment and retention.
The MoD welcomed the recognition of good work carried out, but said some "problem areas" still needed work.
The worst barracks accommodation should be put right "as a priority" but the challenge was "enormous," the report said.
The Commons defence committee report says Defence Estates - which manages the MoD's buildings and land - has done "much good work," but has to raise its game. It also says much more investment is needed.
It says, despite "considerable progress", some single living accommodation - barracks for single personnel - is in an "extremely poor condition".
The Project Slam modernisation programme has created more than 6,000 new bed spaces with another 3,000 planned and new accommodation is "first rate", the committee says.
But some blocks remained "appalling" and should be put right as a priority, it said.
In family housing, repairs had been sub-contracted to a private company, but the level of service was "unacceptably poor", the committee said.
"Quite apart from this being poor management of property, accommodation is an important factor in retention and the MoD must do more to address the condition of accommodation if it is not to lose experienced personnel who are very difficult to replace."
Homes sold off
It noted that when family accommodation - most of which is now owned by Annington Homes Ltd and rented back to the MoD - is sold off, the share of proceeds that the government gets back is not reinvested in the MoD but goes to the Treasury.
Commenting on the report, shadow defence secretary Liam Fox said: "It's a national scandal.
"The government has thrown public money around spending over £2.3bn on MoD consultants but hasn't been able to provide decent accommodation for those who are asked to defend this country.
"The fact that troops in a war zone in the Afghan desert are in better accommodation than soldiers in the UK should bring home to the public how low a priority the Armed Forces are for Labour.
"Ministers need to realise the effect this neglect is having on retention rates as the military covenant continues to be broken."
The committee's Conservative chairman James Arbuthnot said: "Service personnel and their families should not have to put up with run-down buildings and a poor service for repairs, especially at a time when we are asking the armed forces to put their lives on the line in Iraq and Afghanistan."
Defence Minister Bob Ainsworth said he was pleased the good work that had been done had been recognised, but added: "I acknowledge that there are problem areas of the estate which require significant work.
BBC News was sent pictures of poor forces accommodation
"We are making progress in upgrading our housing and accommodation - a big task considering that we manage some 71,000 family properties and 165,000 bed spaces worldwide.
"It's also a big task because we are trying to reverse a legacy of decades of under-funding - over the next 10 years we will spend £5bn on housing and other living accommodation."
Lib Dem shadow defence secretary Nick Harvey said: "It is shameful that the government is unable to provide something as fundamental as an acceptable standard of housing."
Last year, the former head of the Army General Sir Mike Jackson said some accommodation was "frankly shaming".
In January, BBC News received photos of barracks and shower blocks with cracked walls, mildew and broken pipes.