Well, Intel does not support Visual Studio. However, if you use one of the supported IDE's the Galileo's behavior would be similar. I mean if you are not using the SD Card full Yocto image and you upload an sketch, it will be erased from the Galileo's memory once you reboot the board. If you use the SD Card image, the sketch will be kept in the Galileo's memory even if you reboot the board.
So why don't you try something like this, and if your Galileo still has this behavior, I'd suggest you to contact the Visual Studio folks.