MSBuild doesn't create an EXE file, a compiler does. None of the Microsoft compilers currently support compiling from a memory stream. System.CodeDom provides an illusion of it but it actually uses the disk.
There's stuff coming in the next version of C#, plans are to provide 'compiler as a service' feature. Whether that will affect the build process is murky, I doubt it but have no real clue what it will look like. One of the key properties of Windows is that there is only a slight difference between memory and files. Anything in memory is also in a file, the paging file for example. Memory is only a fast way to read and write file data. When you read or write a file, you are actually reading/writing memory. The file system cache. If it is big enough, it is, the compiler will read that same memory without ever hitting the disk. It will only slow down when the file hasn't been read or written recently.