Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

LibMan installed libraries are not picked up by MapStaticAssets

Đang mở
#799 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
csharp
Lĩnh vực
build-system

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
C#
Star
486
Fork
91
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của aspnet/LibraryManager

Tất cả issue của aspnet/LibraryManager

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.