Yes, E36 tranny. I used the standard E30 318i M40 drive shaft, had to modify the support mount in the middle and remove the big nut at the splines so i could get it short enough.
And i had to shorten the lower shift linkage like 1cm as well.
U can use the E30 tranny but the E36 M42 uses the 15mm pilot bearing in the crank so u will have to put a 12mm bearing in it with the E30 tranny. (pretty easy though)
Isnt the clutch the same? If its not just use the new clutch and E30 tranny 
the e30m42 is such a weird beast (as e30s go) that i'm not sure.
the clutch mfgr f'd up and sent an m20 pilot bearing, so we had to go to the dealer and get a (bigger) m42 one. as i understand it, this may be the same as the m5X-series bearing, so i might be ok to do a direct swap on the engine side...
only question is, will a transmission from an e36 (i don't have big-power visions, so either m5X/m4X would be fine) bolt up to my e30m42 driveshaft, making it an easy in/out?
i just moved and will be taking easily-available public transport to school, and the gf lives with me now, so long freeway trips are no longer a factor- i'll readily trade out an overdrive 5th gear for a close-ratio setup if everything is going to bolt right up...