我正在使用 Visual Studio 2010 SP1。
我首先尝试的是这样的:
msbuild myproject.sln or msbuild myproject.sln /p:Configuration=Release
devenv myproject.sln /Build and devenv myproject.sln /Run
现在,如何在不打开 IDE 的情况下构建和运行解决方案?
--------------------------已修复------------------------- -------
问题是我在错误的地方寻找可执行文件(菜鸟错误)。我最终使用了这个批处理文件:
msbuild myproj.sln /p:configuration=Release
cd (("Path to executable" usually in the Debug/Release Folder))
myExecutableName
cd (("Path to original folder"))
最佳答案
您可以更换三个单独的
cd
一个命令:cd myproject\bin\Release
或者简单地从解决方案文件夹运行您的可执行文件:
myproject\bin\Release\myproject.exe
关于visual-studio-2010 - 在不打开 IDE 的情况下从 Visual Studio 控制台运行解决方案,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15754302/