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

LibMan installed libraries are not picked up by MapStaticAssets

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

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

評価

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

調査の方向性

Start with the csproj integration using Microsoft.Web.LibraryManager.Build, especially the LibraryManagerRestore target and the static web assets targets named in the report. Reproduce with dotnet publish and inspect the generated PROJECTNAME.staticwebassets.endpoints.json. Done means libraries restored into wwwroot/lib appear in that manifest even when the folder did not exist before the build.

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

説明

Describe the bug

When using .NET 9's MapStaticAssets, existing assets in wwroot are picked up and compressed during build.
However, using Microsoft.Web.LibraryManager.Build, the libraries installed via libman in wwwroot/lib are not picked up.
I've tried numerous combinations of adding a target that tries to trigger the LibraryManagerRestore target before various other targets that sound like they are looking for assets (like ResolveStaticWebAssetsInputs or ResolveProjectStaticWebAssets) but none of that seems to work.

To Reproduce

Steps to reproduce the behavior:

  1. Create a csproj that uses the ASP.NET web SDK with library manager (including Microsoft.Web.LibraryManager.Build) and restores libraries using libman into wwwroot/lib
  2. run dotnet publish --configuration release --output ./dist
  3. Check the generated static web assets file in the output (cat dist/PROJECTNAME.staticwebassets.endpoints.json)
  4. Find that it does not contain any files that were restored by libman in wwwroot/lib
Expected behavior

LibMan restored files are included in the static web assets manifest.

Additional context

Note that this is rather hard to reproduce in an IDE, since it will usually automatically restore the libman libraries.
If the wwwroot/lib folder exists BEFORE the build is started, it is also correctly picked up by the static web assets tooling.
We've hit the problem during CI builds.

dotnet --version: 9.0.305
Microsoft.Web.LibraryManager.Build: 3.0.71

主要言語
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 を短くまとめたダイジェスト。