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
相关问题
- Reading data from a SAS data source in .Net
- Bitshift operation with signed and unsigned
- Project Build gets Skipped in VS2008 after convers
- how do I specify in qmake 4.5's .pro file that
- Why the overriden `operator new` isn't called?
相关文章
- Identify which file has included some particular h
- How to determine whether object reference is null?
- Evaluating expressions using Visual Studio 2005 SD
- Using base class function pointer to access derive
- MS compiler optimization that replaces variables i
- How best to deal with gigantic source code files i
- How to switch between DataGridViewTextBoxCell and
- Visual Studio ClickOnce deployment - certificate e
Okay, I think I know what you are looking for. I think there's a better way to word this, but what you need to do, is to open the Visual Studio Command Prompt Found in the Start Menu. Within it you can use the "cl" command to compile C/C++. Usage: cl [ option... ] filename... [ /link linkoption... ]
As in:
cl /O2 test.c
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.
The granularity of compilation is the DLL, so there is no way to do what you are asking.
Or do you mean that you compile the whole solution for a singe change (or at least VS checks if all projects require building) ? There is an option under 'project and solution' / 'Build and run', 'only build startup projects and dependencies on Run' that helps.
Edited: Ctrl-f7 for 'build file' is for C++ projects.
Compile a project — ignoring all irrelevant files. (See also https://stackoverflow.com/a/18940150/2422360 for an answer I wrote that has a fuller look at this.)