Did it on my 1998 E36 M3 but also valid for some E34, therefore I post it here.

Bought a cheapo alu housing instead of OEM composite = connection flange 11531722531 with profile gasket 11531740437, t-stat 88CEL 11537511580 and the o-ring 60X3,5mm 11531265084 for the t-stat to replace the broken t-stat and the original composite OEM connection flange. Bought it from a seller in the well known auction house quite cheap and so was the quality of the product, I had to find out although the pics on the bay looked pretty good.

Good that I have a small hand held grinder and polisher set with grinder and polishing bits, so I could remove particles and rough spots inside the housing from the casting and make it smooth. As I read a lot about leaking cheap alu housings I also used RTV. Before that I used a flat sanding block and some very fine sandpaper to flatten out the mating surface. Installed it with a thin coat of RTV and it seems to be not leaking after a first 50 miles drive.

Bleeding the system was no problem. Although I read that some people put the car on ramps in the front that the engine and t-stat is at highest point. I made it on a flat surface. Opened the bleeder screw a bit, removed the radiator cap and filled a mix of coolant, then started the cold engine and let it run, re-filling into the expansion tank when needed.

After the engine was at operating temperature I set the heater valves on full hot and the blower fan to a bit higher speed, also massaging the coolant hoses helped to bleed the air bubbles out.
Very important is that you wear protection glasses, the coolant suddenly can splash out of the expansion tank or when you have removed the bleeder screw complete, when an air bubble comes to the bleeder screw. I had the glasses full of splashed coolant.

The original t-stat was made end of 1997 and made by Wahler in Germany, so it lasted from production of the car till now abt 50 kmiles, good quality. So buy a quality t-stat at higher price, less trouble and lasts longer.

Comment from an E36 owner on another forum:
My experience is the quality of the casting and machining on those inexpensive aluminum housings is horrible. I recently had a friend show me a high quality $75 aluminum housing and the difference is very dramatic. That being said...the biggest problem with those cheap ones is the gasket/mating surface isn't always flat. I have replaced a half dozen of those housings over the years. I always use RTV. Not much. Just a thin coating. Never any leaks.

As far as the OEM plastic housing is concerned it's not really plastic. The original ones from 92-95 were plastic but BMW had high failure rates so they replaced them with a new composite material. Those composite ones actually worked very well but they get a bad wrap because now they are all starting to fail. Of course no one wants to admit that any part that lasts over 100,000 miles is actually a very successful part. Be aware that BMW considers those composite housings as a one time use item. If the t-stat requires replacing you're supposed to replace that composite housing with a new one.
For the older version OEM plastic housing they also used a kind of paper gasket to cover the complete mating area, but on the newer version composite housing there is no paper gasket anymore, just the profile gasket 11531740437 and the o-ring for the t-stat.