Ways to Build
命令行编译.sln
MSBuild Sample.sln /t:Clean /p:Configuration=Debug /p:Platform=x64
MSBuild Sample.sln /t:Rebuild /p:Configuration=Debug /p:Platform=x64
MSBuild Sample.sln /t:Build /p:Configuration=Debug /p:Platform=x64
MSBuild -noLogo Solution.sln /t:projectName /p:Configuration=Debug /p:Platform=x64
MSBuild -noLogo Solution.sln /t:projectName:clean /p:Configuration=Debug /p:Platform=x64
MSBuild -noLogo Solution.sln /t:projectName:rebuild /p:Configuration=Debug /p:Platform=x64
MSBuild -noLogo Solution.sln /t:build
MSBuild -noLogo Solution.sln /t:clean
MSBuild -noLogo Solution.sln /t:rebuild
MSBuild.exe MultiProjectSolution.sln /t:"ProjectName:clean"
Command-line project management tools
By default, the Visual Studio IDE uses native project build systems based on MSBuild. You can invoke MSBuild directly to build projects without using the IDE. You can also use the devenv command to use Visual Studio to build projects and solutions. Visual Studio also supports build systems based on CMake or NMake.
MSBuild
Use MSBuild (msbuild.exe) and a project file (.vcxproj) to configure a build and
invoke the toolset without loading the Visual Studio IDE.
It's equivalent to running the Build project or Build Solution command in the Visual Studio IDE.
MSBuild has advantages over the IDE when you build at the command line.
You don't have to install the full IDE on all your build servers and build pipelines.
You avoid the extra overhead of the IDE.
MSBuild runs in containerized build environments, and supports a binary logger.
DEVENV
Use DEVENV (devenv.exe) combined with a command-line switch such as
/Build or /Clean to execute certain build commands without displaying the Visual Studio IDE.
CMake
CMake (cmake.exe) is a cross-platform, open-source tool for defining build processes that run on
multiple platforms. CMake can configure and control native build tools for its supported platforms,
such as MSBuild and Make. For more information about CMake, see the CMake documentation.
NMAKE
Use NMAKE (nmake.exe) to build C++ projects by using a traditional makefile.
Note
Starting in Visual Studio 2019 version 16.5, MSBuild and DEVENV don't use the command-line environment
to control the toolset and libraries used.
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· winform 绘制太阳,地球,月球 运作规律
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· AI与.NET技术实操系列(五):向量存储与相似性搜索在 .NET 中的实现
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
2017-05-12 中文乱码
2017-05-12 windows 下 latex graphviz 字体设置
2017-05-12 语言代码表
2017-05-12 graphviz hello world
2017-05-12 task
2017-05-12 配置环境