Package Restore Operations
Restore missing NuGet packages for your projects.
What is Package Restore?
Package restore downloads packages referenced in project files but not present locally.
When to Restore
Restore packages when:
- Cloning a repository
- After cleaning the solution
- Package files are missing
- After changing branches
Automatic Restore
The extension automatically restores packages:
- When opening a solution
- Before building
- When adding a project
Manual Restore
From Solution Explorer
- Right-click on a project or solution
- Select "Restore NuGet packages"
- Wait for the restore to complete
From Command Palette
- Press
Ctrl+Shift+P
- Type "NuGet: Restore Packages"
- Select the command
Restore Process
During restore:
- Project files are scanned for package references
- Missing packages are identified
- Packages are downloaded from sources
- Packages are extracted to the local cache
- Project references are resolved
Restore Output
Monitor restore progress:
- Terminal panel shows download progress
- Output panel shows detailed logs
- Status bar shows current operation
Troubleshooting
Restore Failed
If restore fails:
- Check internet connectivity
- Verify package sources are accessible
- Check for authentication issues
- Clear NuGet cache and retry:
dotnet nuget locals all --clear
Slow Restore
If restore is slow:
- Check network speed
- Use a local package cache
- Mirror packages locally
- Configure parallel downloads