Here is a simple DIY for replacing problematic Vanos solenoids in your E90, E91, E92 and E93 cars with N52 motors. Should be similar on other cars with N52's such as 128i's.
I was getting a 2A7C error code (DME - Vanos Inlet - Cold Start) which led me to replacing the intake solenoid. At the end of the day, my code was actually being thrown due to previously mixing up the wiring harnesses during my valve cover replacement. So before spending the money on replacements, verify that the harnesses aren't mixed up if you are seeing those code after performing some maintenance.
Torque Spec for Solenoid bolts are 8-10 nm (70-88.5 in/lbs)
Part number for both intake and exhaust: 11367585425