VSTS构建不使用.vdproj生成.msi文件

时间:2019-02-11 12:32:48

标签: azure-devops windows-installer azure-pipelines

我有VSTS构建,它将使用.msi生成.vdproj文件,但是我没有从构建中获取.msi文件。

我收到Warning MSB4078: The project file "abcdSetup\abcdSetup.vdproj" is not supported by MSBuild and cannot be built

我正在使用Visual Studio构建任务和MS构建任务来生成.msi

我尝试了一些方法,并从VS安装程序项目中安装了名为create .msi文件的第三方任务。

我已随附了用于生成此.msi文件的所有任务的快照。

请看一下并在此方面为我提供帮助,同时也请告知我们VSTS中是否有创建.msi文件的任务。

enter image description here

2 个答案:

答案 0 :(得分:0)

  

我收到警告MSB4078:MSBuild不支持项目文件“ abcdSetup \ abcdSetup.vdproj”,并且无法构建

那是因为MSBuild / Visual Studio不支持安装项目。要与Azure DevOps集成,您将必须使用devenv。

注意:从VS 2013开始,外接程序提供对.vdproj的支持。

那是您收到错误Warning MSB4078: The project file "abcdSetup\abcdSetup.vdproj" is not supported by MSBuild and cannot be built

的原因
  

有什么方法可以生成.msi而无需设置   VSTS中的私人代理?请让我知道有没有可用的任务。

恐怕没有这种方法可以在没有在Azure DevOps中设置私有代理的情况下生成.msi,否则,我们将始终收到错误消息:

Some errors occurred during migration. For more information, see the migration report: C:\VSTS-vs2017-agent\_work\9\s\Setup1\UpgradeLog.htm

我在不安装Visual Studio Installer项目扩展的情况下在专用代理和本地PC上对其进行了测试,并得到了相同的结果。然后,我将该扩展程序安装在本地PC上,并且工作正常。因此,如果要构建安装项目,则必须安装Visual Studio Installer项目扩展。

希望这会有所帮助。

答案 1 :(得分:0)

在发布代理图像 Windows2019 之前是不可能的。新图像配备了名为 vdprojMicrosoft Visual Studio Installer Projects 扩展名。

步骤:

  1. 添加 Command line 任务
  2. 在那里添加以下行:"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\devenv.com" MyProjectDir\MySolution.sln /Rebuild Release

备注:请注意使用devenv.com(不是devenv.exe)。 “com”版本将构建日志和错误输出到控制台(标准输出)。