Yes, it is possible to build an operating system in C#. However, authoring performant kernels in managed languages is an open and 'unsolved' research area, with many challenges. In addition, the standard microsoft C# .NET compiler tools are not sufficient for such a task.
Microsoft built the Singularity kernel using a variant of C#. MOSA
are hobby projects building operating system kernels in C#.
C# can be "ahead of time" compiled to machine code, just like C/C++. However, one would need to author a custom compiler to control the output format and runtime dependencies of this code. MOSA and Cosmos both have custom MSIL to native code compilers for this purpose. The open source Mono compiler also has AOT capabilities and could be modified for such a purpose.
The C# runtime is more extensive than the C/C++ runtime, but both require runtime support. One of the biggest differences and complexities in a C# runtime is the garbage collector. The vast majority of kernels do not use garbage collectors. Garbage collection "stop the world" pauses are a significant challenge to overcome for an OS kernel. The Azul C4 Pauseless Collector
may be a possible solution, but is still very new technology.
So yes, you can write an operating system (kernel) in C#, and yes, it's already been done before. However, these are research systems, with tradeoffs, compromises, and experimentation. It is not clear whether or not you could write, for example, a version of a traditional macrokernel like Linux or Windows-kernel in C# and get similar performance results -- it has never been done before.