c# - 如何从 jenkins 构建 visual studio 安装程序项目 (.vdproj) 以生成 .exe 和 .msi 文件?

标签 c# visual-studio jenkins msbuild continuous-integration

我有一个 visual studio 安装程序项目 (.vdproj),我想从 jenkins 构建它。有人可以为此提供解决方案吗? 我尝试使用 msbuild,但它不适合我。 然后我在批处理文件中尝试了以下内容。

devenv.exe pathToProject\projectName.vdproj /build "Release|Any CPU"

这没用。

然后我试了一下

devenv.com  pathToProject\projectName.vdproj /build "Release|Any CPU"

在这种情况下,项目已构建,但 .exe 和 .msi 文件未在 Release(或 Debug)文件夹中创建。

最佳答案

How to build visual studio installer project (.vdproj) from jenkins to generate .exe and .msi files?

请尝试以下构建命令行:

devenv.com  pathToProject\projectName.vdproj /build "Release"

据我们所知,我们无法为 Installer 项目指定平台,因为:

The architecture is specified in the setup project's properties window which, confusingly enough, is not the same as the property pages, which is what you are showing there.

If you select the setup project in solution explorer and click F4 you sould see the properties window with AddRemoveProgramsIcon, Manufacturer and so on. Down that list is TargetPlatform where you specify x86 or x64.

认证:Can't set 64 bit target for Setup Project in Visual Studio 2017

enter image description here

参见 Automating the build of MSI setup packages on Jenkins了解一些细节。

注意:项目文件.vdproj 不受MSBuild 支持,这就是您无法使用MSBuild 构建它的原因。

关于c# - 如何从 jenkins 构建 visual studio 安装程序项目 (.vdproj) 以生成 .exe 和 .msi 文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51781446/

相关文章:

c# - stdole.dll 有什么作用?

c# - 我怎样才能有一个不执行任何操作的 LINQ where 子句?

c# - 从 Assets 中获取 Material

wpf - 绑定(bind)字符串格式数字逗号且无小数位

visual-studio - 尝试连接到运行 IISExpress 的本地主机时如何解决 ERR_CONNECTION_REFUSED - 错误 502(无法从 Visual Studio 进行调试)?

jenkins - Kubectl 删除但忽略有错误的

grails - 在 Jenkins 中更轻松地获得测试结果

c# - ViewModel 和 UserControl 的 View 之间的通信

asp.net-mvc - 无法在 cshtml 中加载 ReportViewerForMvc 引用

java - Jenkins 文件路径作为参数