Well, VS2010 is an IDE. In the background it uses the command line tools cl.exe and link.exe to create the executables.
There are portable versions of both IDEs and Compilers.
It should be possible to create a portable version of the MinGW compiler as everything is kept in the installation directory.
For IDE, the Code::Blocks website has instructions on how to make your installation portable:
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_make_Code::Blocks_portable.3F