I did a manual swap on my 330ci 2001.
It costs me about 2k in parts. Sold old parts for about 600$. = 1.4k for parts
now, I don't know anything about Xi drivetrain but, I did kept my automatic diff. It's really not that bad on gas, and it's a great ¨mod¨.
You don't need ANY electronics, you don't even need a clutch switch. It's all about how you wire it.
For the reprogram part, I did all by myself and can help you in the process if you are serious about it. If you pay a shop to do it, it can be done in less than 1 hour, if they know what they do, which no shop seemed to know here in quebec...
I'd recommend finding a mechanic that knows bmws and works at home on his free time. It might be longer, but you'll pay way less money for the labour. If you get it done by a shop, if you supply your parts, they may not garanty the job, and if they supply the parts... it will cost more.
*There's someone on Mtlracing forum who's parting out a e46 and got a manual xi tranny for only 150$. Hi think he got many other parts for a swap. But like I said, you don't need any electronics.