Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Errors running libman CLI commands as a pre-build step in projects building in parallel on an Azure hosted agent

オープン
#526 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
csharp
領域
build-system, cli

調査の方向性

Start by reproducing the two-project parallel build using the libman clean && libman restore pre-build commands and the Azure Pipelines installation steps. Inspect how concurrent CLI invocations access .librarymanager/libman.config.json; done means both projects build successfully without the file-in-use exception.

索引モデルが issue の本文から書いたものです。

説明

Functional impact

Running into errors building projects in parallel on an Azure Pipelines hosted agent when they both invoke the libman CLI as a pre-build step.

Minimal repro steps
  1. Create a Visual Studio solution with 2 projects that both invoke "libman clean && libman restore" as a pre-build step
  2. Create an Azure Pipeline that
    1. Uses a 'dotnet' task to install the libman CLI to Agent.ToolsDirectory
      dotnet tool install Microsoft.Web.LibraryManager.Cli --tool-path="$(Agent.ToolsDirectory)"
    2. Uses a 'Powershell' task that adds Agent.ToolsDirectory to the environment variables
      Write-Host "##vso[task.setvariable variable=PATH;]${env:PATH};$(Agent.ToolsDirectory)";
    3. Builds the solution in parallel
  3. Run the build on an Azure hosted agent
Expected result

Libman CLI commands run successfully

Actual result

Sometimes I see the following error output for one of the projects which causes the build to fail:

Unhandled Exception: System.TypeInitializationException: The type initializer for 'Microsoft.Web.LibraryManager.Configuration.Settings' threw an exception. ---> System.IO.IOException: The process cannot access the file 'C:\Users\VssAdministrator\.librarymanager\libman.config.json' because it is being used by another process.
Further technical details

I assume the issue is because both commands are running simultaneously and one puts a lock on libman.config.json so the other can't access it. I have run the build on a VM agent and do not see this error, though I installed libman globally on that machine so the 'install Libman CLI' step isn't part of the pipeline that runs on it.

主要言語
C#
スター
486
フォーク
91
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

aspnet/LibraryManager のほかの issue

aspnet/LibraryManager の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。