I've done the conversion you propose and, as the others noted, there are a lot of things that won't interchange between drop and flat bars.
I was able to do it cheaply because I had a lot of suitable surplus and take-off parts already in my parts boxes, including the road shifters and suitable bars with the correct center diameter. Also, my MTB had cantilevers, not V-brakes, so I was able to use them without travel adapters.
I never would have considered the conversion if I had to buy all the replacement parts. I agree with the advice that if you really want a road bike, get a road bike.