To add to all the answers here, how about libraries. There are tons of classes in .NET which simply wrap the Win32 API.
Such as Directory.GetFiles()
, check it out with reflector, mainly the InternalGetFileDirecotryNames()
internal method, it just turns around and calls the Win32 API.
The answer to your question is more than just, "it's hard" or "it takes lots of time". It is also about resources, not to mention having a large code base that's WRITTEN, TESTED, and PAID FOR. To be rewritten, which WILL introduce bugs guaranteed.
Could Microsoft reimplement Windows with a .NET core instead of a Native Core? Absolutely, there is no question it is possible. It would just time to get it right. I don't think anyone would want to wait that long. Parts of the OS will be implemented in Managed Code and perhaps one day the Kernal too, but to just dump out millions of line of working code, isn't going to happen.
Also, if we remove native support in the OS, then apps like Office, IE, Firefox, iTunes, and Visual Studio, will no longer work! There are parts if not the entire product written in C++.
p.s. If the Office team has publicly refused to rewrite Office in .NET, how can you expect the Windows team (the platform Office runs on top of) to rewrite their product?