3

最近、Windows アプリケーションの一部を VS2019 にアップグレードし、VS2019 の VSInstallerProject 拡張機能を使用してセットアップ プロジェクトを作成しました。私が気づいたのは、リリース パイプラインの実行時にセットアップが作成されないことですが、ここで msi (または exe) ファイルが必要なので、同じものを使用してアプリ サーバーにインストールできます。

パイプラインに変更を加え、リリース パイプラインに「DutchWorkz - Build VS Installer(s)」というタスクを追加しました。Azure Devops のこのタスクで発生したエラーのログを以下に添付しました。このタスクでビルドが失敗しています。

ここでの問題とは何か、どうすれば解決できますか? また、VS2019 でセットアップ プロジェクト/msi を作成したいのですが、このタスクに Vs2019 オプションが表示されません。VS2019 バージョンでこのタスクを使用するにはどうすればよいですか。エージェント サーバーに Vs2019 がインストールされています。

エージェント サーバー

ビルド定義

2020-09-21T20:04:43.3394997Z ##[section]Starting: Create .msi file(s) from VS Installer project(s).
2020-09-21T20:04:43.3539534Z ==============================================================================
2020-09-21T20:04:43.3539958Z Task         : DutchWorkz - Build VS Installer(s)
2020-09-21T20:04:43.3540023Z Description  : Build .msi file(s) from VS Installer project(s).
2020-09-21T20:04:43.3540076Z Version      : 1.2.4
2020-09-21T20:04:43.3540129Z Author       : DutchWorkz B.V.
2020-09-21T20:04:43.3540201Z 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.
2020-09-21T20:04:43.3540311Z ==============================================================================
2020-09-21T20:05:07.5667900Z DEBUG: Aggregated: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\devenv.com
2020-09-21T20:05:07.5714835Z Now running (C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\devenv.com) with Arguments ("D:\VSTS Agent Folder\SO\6\s\SOApplications.sln" /Build "release|any cpu" /Project "D:\VSTS Agent Folder\SO\6\s\App_Tool_Installer\App_Tool_Installer.vdproj" /Out "D:\VSTS Agent Folder\SO\6\b\BuildInstaller_Log_20200921200507.txt")
2020-09-21T20:05:15.0213322Z Done running DevEnv process. Success = False.
2020-09-21T20:05:15.0238151Z ##[error]Unable to process command '##vso[task.addattachment type=Distributedtask.Core.Summary;name=Installer project errors;]D:\VSTS Agent Folder\SO\6\b\BuildInstaller_Log_20200921200507.txt' successfully. Please reference documentation (http://go.microsoft.com/fwlink/?LinkId=817296)
2020-09-21T20:05:15.0239574Z ##[error]Cannot upload task attachment file, attachment file location is not specified or attachment file not exist on disk
2020-09-21T20:05:15.1116369Z Attachment added: Log file for Installer generation.
2020-09-21T20:05:15.1928578Z ##[error]An error occurred while running DevEnv! Please review logfile BuildInstaller_Log_20200921200507.txt
2020-09-21T20:05:15.2720322Z ##[section]Finishing: Create .msi file(s) from VS Installer project(s).

セットアップ プロジェクトをビルドするために、devenv コマンド ラインも使用してみました。vs2017(プロフェッショナル)と vs 2019(エンタープライズ)の両方で試しましたが、両方で問題が発生しています。 2019 の問題の原因を突き止めることができません。この問題の原因と解決方法についてご意見がありましたらお知らせください。目標はもちろん、Azure DevOps パイプラインを使用してセットアップ プロジェクトをビルドし、生成された msi ファイルを使用してアプリ サーバーにインストールすることです。前もって感謝します 。

新しいビルドと問題のスクリーンショットは次のとおりです。 新しいビルド定義 2019年の問題 2017年問題

ビルド エージェント サーバーには Vs インストーラーが既にインストールされています。問題がないか確認してください。 vsインストーラー

以下の「コマンド ライン タスク」からの新しいログを確認してください。

2020-09-26T16:04:39.7854210Z ##[debug]Evaluating condition for step: 'Command Line Script'
2020-09-26T16:04:39.7856182Z ##[debug]Evaluating: succeeded()
2020-09-26T16:04:39.7856654Z ##[debug]Evaluating succeeded:
2020-09-26T16:04:39.7857594Z ##[debug]=> True
2020-09-26T16:04:39.7858101Z ##[debug]Result: True
2020-09-26T16:04:39.7858600Z ##[section]Starting: Command Line Script
2020-09-26T16:04:39.8082090Z ==============================================================================
2020-09-26T16:04:39.8082357Z Task         : Command line
2020-09-26T16:04:39.8082602Z Description  : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
2020-09-26T16:04:39.8082847Z Version      : 2.164.2
2020-09-26T16:04:39.8083025Z Author       : Microsoft Corporation
2020-09-26T16:04:39.8083274Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
2020-09-26T16:04:39.8084133Z ==============================================================================
2020-09-26T16:04:39.8097829Z ##[debug]tf vc resolvePath $\CDM\Dev /loginType:OAuth /login:.,*** /noprompt
2020-09-26T16:04:40.1991127Z ##[debug]D:\VSTSAgent\sn\30\s
2020-09-26T16:04:41.0198149Z ##[debug]VstsTaskSdk 0.9.0 commit 6c48b16164b9a1c9548776ad2062dad5cd543352
2020-09-26T16:04:41.1044331Z ##[debug]Entering D:\VSTSAgent\sn\_tasks\CmdLine_d9bafed4-0b18-4f58-968d-86655b4d2ce9\2.164.2\cmdline.ps1.
2020-09-26T16:04:41.1126277Z ##[debug]Loading resource strings from: D:\VSTSAgent\sn\_tasks\CmdLine_d9bafed4-0b18-4f58-968d-86655b4d2ce9\2.164.2\task.json
2020-09-26T16:04:41.1272687Z ##[debug]Loaded 6 strings.
2020-09-26T16:04:41.1306950Z ##[debug]SYSTEM_CULTURE: 'en-US'
2020-09-26T16:04:41.1325343Z ##[debug]Loading resource strings from: D:\VSTSAgent\sn\_tasks\CmdLine_d9bafed4-0b18-4f58-968d-86655b4d2ce9\2.164.2\Strings\resources.resjson\en-US\resources.resjson
2020-09-26T16:04:41.1467074Z ##[debug]Loaded 6 strings.
2020-09-26T16:04:41.1670941Z ##[debug]INPUT_FAILONSTDERR: 'false'
2020-09-26T16:04:41.1696717Z ##[debug] Converted to bool: False
2020-09-26T16:04:41.1718695Z ##[debug]INPUT_SCRIPT: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\devenv" "D:\VSTSAgent\sn\30\s\st.sn.ComponentManagement.sln" /build release'
2020-09-26T16:04:41.1739155Z ##[debug]INPUT_WORKINGDIRECTORY: 'D:\VSTSAgent\sn\30\s'
2020-09-26T16:04:41.1861366Z ##[debug]Asserting container path exists: 'D:\VSTSAgent\sn\30\s'
2020-09-26T16:04:41.1900763Z Generating script.
2020-09-26T16:04:41.1963727Z Script contents:
2020-09-26T16:04:41.1969048Z "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\devenv" "D:\VSTSAgent\sn\30\s\st.sn.ComponentManagement.sln" /build release
2020-09-26T16:04:41.2078510Z ##[debug]AGENT_VERSION: '2.173.0'
2020-09-26T16:04:41.2148233Z ##[debug]AGENT_TEMPDIRECTORY: 'D:\VSTSAgent\sn\_temp'
2020-09-26T16:04:41.2166134Z ##[debug]Asserting container path exists: 'D:\VSTSAgent\sn\_temp'
2020-09-26T16:04:41.2329780Z ##[debug]Asserting leaf path exists: 'C:\Windows\system32\cmd.exe'
2020-09-26T16:04:41.2337995Z ========================== Starting Command Output ===========================
2020-09-26T16:04:41.2446509Z ##[debug]Entering Invoke-VstsTool.
2020-09-26T16:04:41.2539207Z ##[debug] Arguments: '/D /E:ON /V:OFF /S /C "CALL "D:\VSTSAgent\sn\_temp\442cb1cb-a43b-4d2a-b036-4f16ab588410.cmd""'
2020-09-26T16:04:41.2553937Z ##[debug] FileName: 'C:\Windows\system32\cmd.exe'
2020-09-26T16:04:41.2568488Z ##[debug] WorkingDirectory: 'D:\VSTSAgent\sn\30\s'
2020-09-26T16:04:41.2608339Z ##[command]"C:\Windows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "D:\VSTSAgent\sn\_temp\442cb1cb-a43b-4d2a-b036-4f16ab588410.cmd""
2020-09-26T16:04:47.9474432Z 
2020-09-26T16:04:47.9514773Z Microsoft Visual Studio 2019 Version 16.7.3.
2020-09-26T16:04:47.9656002Z Copyright (C) Microsoft Corp. All rights reserved.
2020-09-26T16:04:47.9656269Z 
2020-09-26T16:04:47.9656416Z The license for Visual Studio expires in 19 days.
2020-09-26T16:04:47.9656554Z 
2020-09-26T16:04:47.9657872Z Some errors occurred during migration. For more information, see the migration report:
2020-09-26T16:04:47.9658144Z D:\VSTSAgent\sn\30\s\UpgradeLog2.htm
2020-09-26T16:04:50.0902169Z 1>------ Build started: Project: st.sn.ComponentManagement, Configuration: Release x86 ------
2020-09-26T16:04:52.8763939Z ========== Build: 1 succeeded, 0 failed, 6 up-to-date, 0 skipped ==========
2020-09-26T16:04:53.4375608Z ##[debug]Exit code: 0
2020-09-26T16:04:53.4417000Z ##[debug]Leaving Invoke-VstsTool.
2020-09-26T16:04:53.4426510Z ##[debug]Leaving D:\VSTSAgent\sn\_tasks\CmdLine_d9bafed4-0b18-4f58-968d-86655b4d2ce9\2.164.2\cmdline.ps1.
2020-09-26T16:04:53.5245394Z ##[section]Finishing: Command Line Script

追加のエラー ログは次のとおりです。

追加ログ

コマンド ライン タスクは成功しましたが、.vdproj セットアップ プロジェクトは更新またはビルドされませんでした。タイムスタンプから、他のすべてのプロジェクトが通常どおり更新されていることがわかります。

4

2 に答える 2

2

参照できる同様のチケットを見つけました。

セルフホステッド エージェントを構成し、VS インストーラー プロジェクト拡張機能が独自のビルド エージェントにインストールされていることを確認してから、" " を指定したコマンド ライン タスクをdevenv使用するか、"VS インストーラーのビルド" タスクを使用して、セットアップ プロジェクトをビルドできます。

8000000A のようなエラーが発生した場合は、次の手順に従ってセルフホスト エージェントを構成できます。 解決策:検証中にエラーが発生しました。HRESULT = '8000000A '.

ちなみに、この拡張機能はサードパーティが開発したものです。拡張機能の所有者に接続して詳細情報を取得できます

アップデート1

拡張機能Build VS Installerをインストールし、タスクを使用DutchWorkz - Build VS Installer(s)して Azure Pipelines で Visual Studio インストーラー プロジェクトをビルドできます。

ここに画像の説明を入力

于 2020-09-22T09:06:57.027 に答える