MIDDLEBOROUGH, Mass. — Carl Horstmann strode around the floor of his factory here, passing welders honing head-high metal tubes as sparks flew. He is one of a dying breed: the owner of Mass Tank, a steel tank manufacturer in a down-at-the-heels region that was once a hub of the craft.

Four years ago, having heard of plans to build a $2.6 billion wind farm off the shores of Cape Cod, he saw opportunity. Much of the work, the developers and the politicians promised, would go to American companies like his, in what would be the dawn of a lucrative offshore wind industry in the United States.

Now, after Mr. Horstmann has spent more than $500,000, much has changed. Cape Wind, the wind farm’s developer, won a court case over an important approval on Wednesday but is still caught up in legal and financial wrangling and faces a tenuous future. And even if the project is completed, most of the investment and jobs for supplying the parts will go not to American companies like Mass Tank, but to European manufacturers.

Mr. Horstmann’s company lost a bid to build support structures to a German company it had included as a partner, and last month Cape Wind completed arrangements for other major components, including the giant blades, towers and turbines, to be built in Denmark.