It is the bad neighbor that just won’t go away.

The wood-and-steel frame covering a busy corner of Harlem blots out the sunlight, blocks foot traffic and attracts unsavory crowds and litter. It has been there, in one form or another, for at least 17 years, making it one of the most notorious examples of that increasing scourge of New York City sidewalks: scaffolding.

“Everybody complains,” said Joyce Nicholas, 73, whose hair braiding salon sits under the scaffolding. “It’s been up too long.”

The scaffolding wraps partly around a six-story apartment building with crumbling stonework. It was intended to be a temporary fix until repairs could be made, to ensure passers-by were not hit by loose stones and debris. But as the years came and went, the building’s facade remained unsafe, and the scaffolding not only stayed but grew bigger.

Now it has become a cautionary lesson as scaffolding has blanketed the city.

In total, more than 285 miles of scaffolding cover the front of 7,862 buildings, according to the city’s Buildings Department. The city began requiring scaffolding as part of a 1980 city law that established regular inspections of building facades after a college student was killed by a chunk of terra cotta that fell from an apartment house.