devenv mysolution.sln /build "Release|Win32" /project myproject
When building from the command line, it seems I have the option of doing a /build
or /rebuild
, but no way of saying I want to do "project only" (i.e. not build or rebuild the specified project's dependencies as well). Does anyone know of a way?
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.
To build a specific target of a specific project in a solution. At the command line, type MSBuild.exe <SolutionName>. sln , where <SolutionName> corresponds to the file name of the solution that contains the target that you want to execute.
Clean Solution - deletes all compiled files (all dll's and exe's ). Build Solution - compiles code files (dll and exe) that have changed. Rebuild Solution - Deletes all compiled files and Compiles them again regardless of whether or not the code has changed.
Depending on the structure of your build system, this may be what you're looking for:
msbuild /p:BuildProjectReferences=false project.proj
MSBuild is what you want
MSBuild.exe MyProject.proj /t:build
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