Amid a large restructuring of its Nokia unit, Microsoft is also joining many technology companies moving manufacturing from China to Vietnam. Microsoft is also moving operations to Brazil and Mexico.

Microsoft on Thursday said it will lay off 18,000 employees, with many of them being factory workers in China. According to Stephen Elop, chief of Microsoft's devices unit, the software giant will move its device manufacturing and marketing operations to markets where Windows Phone has some traction.

Elop said in an email to employees that Microsoft will scale back engineering efforts in Beijing, but keep a team focused on affordable devices.

As for manufacturing, Microsoft's Nokia unit is swapping China for Hanoi, Vietnam, Brazil and Mexico.

Elop said:

"We plan to right-size our manufacturing operations to align to the new strategy and take advantage of integration opportunities. We expect to focus phone production mainly in Hanoi, with some production to continue in Beijing and Dongguan. We plan to shift other Microsoft manufacturing and repair operations to Manaus and Reynosa respectively, and start a phased exit from Komaron, Hungary. In short, we will focus on driving Lumia volume in the areas where we are already successful today in order to make the market for Windows Phone. With more speed, we will build on our success in the affordable smartphone space with new products offering more differentiation. We’ll focus on acquiring new customers in the markets where Microsoft’s services and products are most concentrated. And, we’ll continue building momentum around applications."

Microsoft isn't the first tech giant to scale back its China manufacturing. To wit:

Samsung plans to shift production from China to Vietnam to preserve profit margins.





Intel has operations in Vietnam.





LG also has plants in Vietnam.

What's happened to China is simple. There's a middle class emerging and wages are going up. A factory worker in Hanoi makes $145 a month compared to $466 in Beijing, according to the Japan External Trade Organization (JETRO). Electricity and water costs are also lower in Hanoi. Meanwhile, Vietnam is aggressively courting technology companies and plans to have 30 percent of its industrial product deriving from high-tech.