LibMan installed libraries are not picked up by MapStaticAssets
还没有人认领这个 Issue。
评估
- 难度
- 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:
- Create a csproj that uses the ASP.NET web SDK with library manager (including
Microsoft.Web.LibraryManager.Build) and restores libraries using libman intowwwroot/lib - run
dotnet publish --configuration release --output ./dist - Check the generated static web assets file in the output (
cat dist/PROJECTNAME.staticwebassets.endpoints.json) - 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
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
aspnet/LibraryManager 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
aspnet/LibraryManager#824 · 1 条评论 · 3 个 reaction ·
-
难度 1/5 1 小时以内 新手友好度 68/100
aspnet/LibraryManager#804 · 2 个 reaction ·
-
难度 1/5 1 小时以内 新手友好度 48/100
aspnet/LibraryManager#829 · 1 条评论 · 3 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 42/100
aspnet/LibraryManager#820 ·
-
难度 4/5 3-5 天 新手友好度 35/100
aspnet/LibraryManager#808 · 5 条评论 ·
查看 aspnet/LibraryManager 的全部 Issue
相似的 Issue
-
effort:S P3 refactor
难度 2/5 1-3 小时 新手友好度 75/100
nightscout/nocturne#1532 ·
-
core dependencies
难度 1/5 1 小时以内 新手友好度 80/100
-
documentation
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
DotNetNext/SqlSugar#1458 ·