为什么使用命令行构建VS安装工程时没有输出?
我已在构建计算机上安装了 Visual Studio 2008,因为我们想要构建安装项目来为 C# 应用程序创建 MSI 安装程序。
从IDE来看,它工作得很好。安装程序已按预期创建。
切换到命令行,使用以下命令,过程完成,没有任何错误,但没有输出(未创建安装程序)
DevEnv.exe .\\SystemSoftwareInstaller\\SystemSoftwareInstaller.vdproj /build Debug /Out "debugErr.txt"
将 /build
更改为 /deploy
为 /rebuild
没有区别(没有创建安装程序)
我做错了什么?
I have installed Visual Studio 2008 on our build machine because we want to build the setup project to create MSI installer for our C# application.
From IDE, it works fine. The installer is created as expected.
Switch to command line, with the follow command the process finished without any error but there is no output (no installer created)
DevEnv.exe .\\SystemSoftwareInstaller\\SystemSoftwareInstaller.vdproj /build Debug /Out "debugErr.txt"
change the /build
to /deploy
to /rebuild
have no difference (no installer created)
I am doing anything wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我刚刚遇到了类似的问题,我运行 devenv.exe 并没有得到任何反馈,也没有输出,即使使用 /Log 标志也是如此。这与我在 2005 年使用的完全相同,而且效果非常好。但后来我在同一个文件夹中发现了 devenv.com,所以我尝试了一下,它按预期运行。我不知道 .com 和 .exe 版本之间的区别,但你可以尝试一下。
I just fought with a similar issue, where I'd run the devenv.exe and get no feedback and no output, even with the /Log flag. This is the exact same call I'd use in 2005, and it worked like a charm. But then I found a devenv.com in the same folder, so I tried that, and it ran as expected. I don't know the difference between the .com and .exe versions, but you might try that.
我认为问题在于您正在运行 DevEnv.exe 而不是 DevEnv.com。
这应该输出到控制台。
I think the problem is that you are running DevEnv.exe and not DevEnv.com.
This should output to the console.
尝试在命令行语句中构建解决方案文件而不是 vdproj 文件
解决方案中必须至少有一个项目构成安装程序项目的输出。这些也需要建造。
Try building the solution file instead of the vdproj file in your command line statement
There must be at least one project in the solution that form the output of the installer project. These will need to be built as well.
有趣的问题。我认为这也很容易。通过使用 vdproj 在文件夹中打开 VS2008 命令提示符并运行:
但发布要棘手得多。经过我自己的几次失败尝试后,这个家伙给我指路了。由于某种原因,sln 和 vdproj 的完全限定路径似乎可以解决问题(我再次处于 VS2008 命令提示符中,但这次我位于 SLN 文件夹中):
Interesting question. I thought this would be pretty easy as well. I was able to easily do a release build by opening a VS2008 command prompt in the folder with my vdproj and running:
But release was a lot trickier. After a few failed attempts on my own, this guy showed the way. For some reason, the fully qualified path to the sln and the vdproj seemed to do the trick (again I was in a VS2008 command prompt but this time I was in the SLN folder):
为调试版本创建安装程序是没有意义的,您始终需要发布版本。
如果确实有必要,请在 Visual Studio、“构建 + 配置管理器”中打开 .vdproj,然后勾选“调试”配置的“构建”复选框。请注意,此属性存储在 .sln 文件中,而不是 .vdproj 文件中,因此单击“文件”+“全部保存”以让 VS 写入解决方案文件。
It doesn't make sense to create an installer for the Debug build, you always want the Release build.
If that's really necessary then open the .vdproj in Visual Studio, Build + Configuration Manager and tick the Build checkbox for the Debug configuration. Beware that this property is stored in the .sln file, not the .vdproj file so click File + Save All to let VS write the solution file.