Once you have done the coding and want to build your code or solution, follow the below shortcut keys
1. Press Ctrl+Shit+B or Alt+B+B or F6.
2. To rebuild your solution Press Alt+B+R
When we compile our code, visual studio automatically save our source code and it’s not necessary to save code before compile the solution.