LibMan installed libraries are not picked up by MapStaticAssets
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- csharp
- Ambito
- build-system
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- C#
- Stelle
- 486
- Fork
- 91
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di aspnet/LibraryManager
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
aspnet/LibraryManager#824 · 1 commento · 3 reazioni ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
aspnet/LibraryManager#804 · 2 reazioni ·
-
Changelog for 3.0.114 Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 48/100
aspnet/LibraryManager#829 · 1 commento · 3 reazioni ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
aspnet/LibraryManager#820 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
aspnet/LibraryManager#808 · 5 commenti ·
Tutte le issue di aspnet/LibraryManager
Issue simili
-
CS0162 "Unreachable code detected" warning from a MSBuildTemp .tmp file in every game project Apertabug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
Type: enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
apache/arrow-adbc#4809 ·
-
type/automation type/tech-debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
microsoft/vscode-azurefunctions#5197 · 1 commento ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
microsoft/microsoft-ui-reactor#1274 ·