Hoping this acts as a good resource for people doing this swap.
Required parts
2004 X3 complete motor from Pull and Save ($300)
E39 oil pan and pickup
E39 engine harness and MS43 DME
E39 manual transmission sub harness
Race German Swap Harness (obd2 and the e39 variant)
Ms43 MAF
I used S52 obd2 headers
S52 engine mounts
Custom AN/JIC line for High pressure line from pump to the rack. - had mine made at Napa
Either an e46 pedal or a potentiometer out of a z3 M Roadster with euro pedal mounting bracket.
Things I recommend replacing while you have the engine on a stand are as follows;
Front main seal - Do not make my mistake and pull the timing cover. Leave it in place.
Rear main seal - Use the installation tool or you’ll be doing this again.
CCV and associated plastic pipes
Intake manifold gasket
Exhaust manifold gaskets
Coolant hard pipes ( the cheaper versions seem fine but use OEM Orings or you’ll be doing this again soon.
Oil pump nut safety wire mod
Oil pan gasket
Oil filter housing gasket
Valve cover gasket
Wiring caveats;
Since I reused the ms45 ignition coil harness instead of purchasing another harness for the ignition coils I had to repin the connector from ms45 to ms43, not too hard and works fine allowing me to run the pencil coils.
Alternator;
If donor motor was a ms45 dme then you need to replace the alternator voltage regulator with a ms43 variant.
Coolant Temperature Sensor;
I used the round 4 pin off my s52b32
Happy to answer any other questions with this swap, great modern budget swap option.
Instagram: @blakedrifts