This spring, city officials announced they would encourage private developers to build on land inside public housing complexes, potentially making luxury apartments their neighbors.

The city’s move was intended to raise billions of dollars to fix up the often rundown complexes, and to expand the city’s below-market-rate housing stock by requiring that 50 percent of such infill construction be set aside as affordable. But the economics of any new buildings will likely depend on also drawing market-rate tenants to places they once might have shunned.

In many ways, the city is just playing catch-up.

More than a half-dozen developers have already planted their stakes near public housing in places including Red Hook in Brooklyn, the Lower East Side of Manhattan and Mott Haven in the South Bronx. In the hopes of securing cheaper land in a city where lots at any price are growing scarce, they are ignoring taboos against living near public housing and venturing into areas once considered unprepossessing and even dangerous.

“They were isolated in the past, and a lot of that had to do with the perception of crime,” said Keith Rubenstein, the managing principal of Somerset Partners, a development firm. “That perception became more pronounced because there was so little interaction with these developments.”