How aspnet/librarymanager works
LibMan installs selected client-side library files into project paths from online catalogs or local/network sources. The main workflow is to edit a libman.json manifest, resolve each requested library through a provider, compute and restore its file goal state, then write files and report results. Users enter through either the CLI or Visual Studio integration. The repository also includes manifest authoring assistance, caching, and provider-specific catalog/search implementations. Several provider and UI internals are not sampled, so their detailed call relationships are omitted or marked unverified.
Main entry points: Manifest.cs Manifest restore · IProvider.cs Provider contract · LibraryCommandService.cs Command service · LibraryManagerPackage.cs VS package
Components 24
User entry points
- CLI app
src/libman/Program.cs - CLI commands
src/libman/Commands
Install engine
- Manifest restore
src/LibraryManager/Manifest.cs - Install state
src/LibraryManager/LibraryInstallationState.cs - Library validation
src/LibraryManager/LibrariesValidator.cs - File goal state
src/LibraryManager.Contracts/LibraryInstallationGoalState.cs - Host file access
src/LibraryManager.Contracts/IHostInteraction.cs - Resource cache
src/LibraryManager/Cache/CacheService.cs - Web requests
src/LibraryManager/Cache/WebRequestHandler.cs
Library sources
- Provider contract
src/LibraryManager.Contracts/IProvider.cs - cdnjs provider
src/LibraryManager/Providers/Cdnjs - jsDelivr provider
src/LibraryManager/Providers/jsDelivr - unpkg provider
src/LibraryManager/Providers/Unpkg - File system provider
src/LibraryManager/Providers/FileSystem
Visual Studio
- VS package
src/LibraryManager.Vsix/LibraryManagerPackage.cs - VS commands
src/LibraryManager.Vsix/Commands - Command service
src/LibraryManager.Vsix/Shared/LibraryCommandService.cs - JSON completion
src/LibraryManager.Vsix/Json/Completion/CompletionController.cs - Library search
src/LibraryManager.Vsix/Search - Light bulb actions
src/LibraryManager.Vsix/Json/SuggestedActions - Error reporting
src/LibraryManager.Vsix/ErrorList
Other components
- Developer
- Online catalogs
- Local or remote files
Connections 25
- Developer → CLI app: runs commands
README.md - Developer → VS package: uses IDE
README.md - CLI app → CLI commands: starts app
src/libman/Program.cs - CLI commands → Manifest restore: installs libraries
src/libman/Commands/InstallCommand.cs - VS package → VS commands: registers commands
src/LibraryManager.Vsix/LibraryManagerPackage.cs - VS package → Command service: imports service
src/LibraryManager.Vsix/LibraryManagerPackage.cs - Command service → Manifest restore: loads and restores
src/LibraryManager.Vsix/Shared/LibraryCommandService.cs - Manifest restore → Install state: tracks desired state
- Manifest restore → Provider contract: resolves provider
src/LibraryManager/Manifest.cs - Manifest restore → Library validation: validates libraries
src/LibraryManager/Manifest.cs - Manifest restore → File goal state: computes file goal
src/LibraryManager/Manifest.cs - File goal state → Host file access: describes file writes
- Resource cache → Web requests: downloads streams
src/LibraryManager/Cache/CacheService.cs - Resource cache → Online catalogs: caches resources
- Provider contract → cdnjs provider: implemented by
- Provider contract → jsDelivr provider: implemented by
- Provider contract → unpkg provider: implemented by
- Provider contract → File system provider: implemented by
- cdnjs provider → Online catalogs: reads libraries
README.md - jsDelivr provider → Online catalogs: reads libraries
README.md - unpkg provider → Online catalogs: reads libraries
README.md - File system provider → Local or remote files: reads files
README.md - JSON completion → Library search: requests suggestions
- Light bulb actions → Command service: offers commands
- Command service → Error reporting: propagates errors
src/LibraryManager.Vsix/Shared/LibraryCommandService.cs