What do you mean the output produced isn't platform-independent? This C# compiler produces assemblies that can be run on e.g. Mono runtime on Linux or on the .NET CLR runtime in Windows.
The C# compiler targets the CLR (Mono or .NET). It produces IL which is similar to Java bytecode. The runtime then JIT's it, but I don't know if that's OS-specific or not.