从bat文件构建安装项目
我想使用 bat 文件构建一个安装项目并生成 msi。我尝试使用 MSBuild.exe 进行构建,如下所示
@echo off
call %windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe C:\Setup1\Setup1.sln
,但 MSBUILD 似乎不支持安装项目。还有其他想法使用 bat 文件构建安装项目吗?
I want to build a setup project using a bat file and want to generate msi. I tried building using MSBuild.exe like below
@echo off
call %windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe C:\Setup1\Setup1.sln
But it seems MSBUILD doesn't support setup projects. Is there any other idea to build the setup project using bat file?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Devnev 就是您所追求的。
以下命令在发布配置中的 C:\Setup1\Setup1.sln 中构建安装项目 Setup1:
或者您可以直接构建它:
Devnev is what you're after.
The following command builds setup project Setup1 in C:\Setup1\Setup1.sln in release configuration:
Or you can build it directly:
如果使用 exec 目标包装 devenv,则可以在 msbuild 中构建安装程序项目:http://thepursuitofalife.com/how-to-build-vdproj-files-in-msbuild/
You can build installer projects in msbuild if you wrap the devenv with the exec target:http://thepursuitofalife.com/how-to-build-vdproj-files-in-msbuild/
您可以将 Visual Studio 输出设置为详细,构建一个安装项目并检查输出以查看 VS 执行哪些操作(我自己没有安装项目来执行此操作,抱歉)。
You can set the Visual Studio output to verbose, build an Installation project and check the output to see what VS does to do the same (I haven't installation projects here to do it by myself, sorry).