I just want to know if we can compile a single file/class in visual studio.I often change just a single file but end up compiling the entire project.THis might be a trivial case but will be very helpful:) I am using visual studio 2005 working on C# project in .net 2.0
Ctrl+F7 will compile only the active source file. Look for the Compile item at the bottom of the Build menu. Of course, you'll still have to do a build before you can test, but if you just want a quick sanity check after modifying a source file, this can be handy.
Open the command prompt tool and go to the directory where you saved the file. Type csc helloworld. cs and press enter to compile your code. If there are no errors in your code, the command prompt takes you to the next line and generates helloworld.exe executable file.
Ctrl+F7 will compile only the active source file.
Look for the Compile item at the bottom of the Build menu.
Of course, you'll still have to do a build before you can test, but if you just want a quick sanity check after modifying a source file, this can be handy.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With