c# – VSTS在线建筑设置项目?

c# – VSTS在线建筑设置项目?,第1张

概述我有一个带有安装项目的.NET控制台应用程序我试图移植到VSTS Online(visualstudio.com)以利用源代码控制以及添加自动构建/部署. 我已经将代码上传得很好并且它构建得很好,但我正在努力让它产生一个MSI.我已经尝试在解决方案构建之后引入一个命令行任务来运行devenv.com,但我无法让它工作.有关获得安装项目以构建其MSI的任何想法? 谢谢! 编辑: 这是我尝试的命令行任 我有一个带有安装项目的.NET控制台应用程序我试图移植到VSTS Online(visualstudio.com)以利用源代码控制以及添加自动构建/部署.

我已经将代码上传得很好并且它构建得很好,但我正在努力让它产生一个MSI.我已经尝试在解决方案构建之后引入一个命令行任务来运行devenv.com,但我无法让它工作.有关获得安装项目以构建其MSI的任何想法?

谢谢!

编辑:

这是我尝试的命令行任务:

Tool: C:\Program files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenvArguments: Solutionname.sln /Build $(BuildConfiguration) /Project Setup\Setup.vdproj

编辑2:

新命令行:

Tool: C:\Program files (x86)\Microsoft Visual Studio17\Enterprise\Common7\IDE\devenv.comArguments: MySolution.sln /Build $(BuildConfiguration) /Project Setup\Setup.vdproj

日志:

2017-10-04T17:58:48.7033117Z ##[command]"C:\Program files (x86)\Microsoft Visual Studio17\Enterprise\Common7\IDE\devenv.com" MySolution.sln /Build release /Project Setup\Setup.vdproj2017-10-04T17:59:12.1156461Z microsoft.visualstudio.telemetry.dll2017-10-04T17:59:12.1196471Z microsoft.visualstudio.telemetry.dll2017-10-04T17:59:12.1196471Z microsoft.visualstudio.telemetry.dll2017-10-04T17:59:12.1196471Z microsoft.visualstudio.telemetry.dll2017-10-04T17:59:12.1206475Z microsoft.visualstudio.telemetry.dll2017-10-04T17:59:12.1206475Z microsoft.visualstudio.telemetry.dll2017-10-04T17:59:12.1206475Z microsoft.visualstudio.extensionmanager.implementation.dll2017-10-04T17:59:46.2231714Z 2017-10-04T17:59:46.2231714Z Microsoft Visual Studio 2017 Version 15.0.26730.3.2017-10-04T17:59:46.2231714Z copyright (C) Microsoft Corp. All rights reserved.2017-10-04T17:59:46.2231714Z 2017-10-04T17:59:46.2231714Z Some errors occurred during migration. For more information,see the migration report:2017-10-04T17:59:46.2231714Z d:\a\s\UpgradeLog.htm2017-10-04T17:59:46.4634939Z ========== Build: 0 succeeded or up-to-date,0 Failed,0 skipped ==========2017-10-04T17:59:48.5239469Z ##[section]Finishing: Run C:\Program files (x86)\Microsoft Visual Studio17\Enterprise\Common7\IDE\devenv.com

编辑3:

根据@Marina – MSFT我已经尝试了Build VS Installer,但它对我来说并不适用.任务竞争成功,但似乎从未实际生成MSI,因为神器丢弃中没有任何内容.以下是任务中的日志:

2017-10-04T20:38:12.1314337Z ##[section]Starting: Create .msi file(s) from VS Installer project(s).2017-10-04T20:38:12.1314337Z ==============================================================================2017-10-04T20:38:12.1314337Z Task : DutchWorkz - Build VS Installer(s)2017-10-04T20:38:12.1314337Z Description : Build .msi file(s) from VS Installer project(s).2017-10-04T20:38:12.1314337Z Version : 1.2.42017-10-04T20:38:12.1314337Z Author : DutchWorkz B.V.2017-10-04T20:38:12.1324342Z Help : <b>BuildVsInstaller v1.2.4</b>,DutchWorkz B.V. (Robin Paardekam)<br/><br/>Visual Studio Installer projects are not supported by MSBUILD,so a regular build will not generate your installer files (.msi). Use this build-task to build the .msi file(s) for your project by running devenv on the buildagent directly. <br/><br/><b>DependencIEs:</b><br/>Dep1: when using VisualStudio 2017,this task will only function properly if you installed it in the default C:\Program files (x86)\ location.2017-10-04T20:38:12.1324342Z ==============================================================================2017-10-04T20:38:15.3883721Z DEBUG: Aggregated: C:\Program files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\..\IDE\devenv.com2017-10-04T20:38:15.4043950Z Now running (C:\Program files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\..\IDE\devenv.com) with Arguments ("d:\a\s\MySolution.sln" /Build "release|any cpu" /Project "d:\a\s\Setup\Setup.vdproj" /Out "d:\a\b\BuildInstaller_Log_20171004203815.txt")2017-10-04T20:39:39.8930682Z Done running DevEnv process. Success = True.2017-10-04T20:39:39.8950669Z The single MSI should be located here: d:\a\s\Setup\release17-10-04T20:39:40.0450669Z ##[warning]No .MSI files were found,please check your build-configuration. If this is expected,you might consIDer to use the default Visual Studio Build task instead of this custom Installer task.2017-10-04T20:39:40.0560673Z ##[section]Finishing: Create .msi file(s) from VS Installer project(s).

任务配置

解决方法 您必须 configure your own build agent才能运行构建,因为Hosted& amp;上没有安装Visual Studio Installer Projects扩展.主持2017年代理.

确保在您自己的构建代理上安装了VS Installer Projects扩展,然后您可以使用命令行任务和“devenv”构建安装项目,或使用“构建VS安装程序”任务.

如果您收到“8000000A”错误,如下所示:


请按照此处的说明配置构建代理:Solution: An error occurred while validating. HRESULT = ‘8000000A’.

然后,您应该能够成功构建安装项目:

总结

以上是内存溢出为你收集整理的c# – VSTS在线建筑设置项目?全部内容,希望文章能够帮你解决c# – VSTS在线建筑设置项目?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/langs/1220494.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-05
下一篇 2022-06-05

发表评论

登录后才能评论

评论列表(0条)

保存