Ensure you have:
- Windows 10 Build 19041 or later, or Windows 11
- Administrator account (required for package operations)
-
Install .NET 8.0 SDK
- Download from: https://dotnet.microsoft.com/download
- Run the installer and follow prompts
- Verify installation:
dotnet --version
-
Install Windows Package Manager (winget)
- Download from Microsoft Store: https://apps.microsoft.com/detail/9NBLGGH4NNS1
- Or install from GitHub: https://github.com/microsoft/winget-cli/releases
- Verify installation:
winget --version
-
Install Visual Studio 2022 (Optional but Recommended)
- Download from: https://visualstudio.microsoft.com/
- Install "Desktop Development with C++" workload
- Select ".NET Desktop Development" workload
- Install Windows 10 SDK (Build 19041 or later)
-
Install Git (Optional)
- Download from: https://git-scm.com/
- Needed if cloning from repository
# If using git
git clone <repository-url>
cd WinGetUI
# Or if extracted from zip
cd path\to\WinGetUI# List key directories
dir WinGetUI\
dir WinGetUI\Models
dir WinGetUI\Services
dir WinGetUI\Views# Run with default settings (Release build)
.\build.ps1
# Run with Debug configuration
.\build.ps1 -Configuration Debug
# Build and immediately run the app
.\build.ps1 -Run
# Clean and rebuild
.\build.ps1 -Clean# Run the batch script
build.bat
# Or build with debug configuration
build.bat debug
# Or build and run
build.bat run# Restore dependencies
dotnet restore WinGetUI\WinGetUI.csproj
# Build the project
dotnet build WinGetUI\WinGetUI.csproj --configuration Release
# Run the application
dotnet run --project WinGetUI\WinGetUI.csproj- Open
WinGetUI.slnin Visual Studio - Select Solution Configuration: "Release" or "Debug"
- Press
Ctrl+Shift+Bto build - Press
F5to run with debugging orCtrl+F5without debugging
The executable will be located at:
WinGetUI\bin\Release\net8.0-windows10.0.19041.0\WinGetUI.exe
cd WinGetUI\bin\Release\net8.0-windows10.0.19041.0\
.\WinGetUI.exe- Press
F5to run with debugging - Press
Ctrl+F5to run without debugging
- Navigate to
WinGetUI\bin\Release\net8.0-windows10.0.19041.0\ - Double-click
WinGetUI.exe
Solution:
- Restart your terminal after installing .NET SDK
- Or add .NET to PATH manually
- Verify with:
dotnet --version
Solution:
- Ensure .NET 8.0 SDK is installed (not just runtime)
- Run:
dotnet workload install desktop - Restore packages:
dotnet restore WinGetUI\WinGetUI.csproj
Solution:
- Clear NuGet cache:
dotnet nuget locals all --clear - Restore packages:
dotnet restore WinGetUI\WinGetUI.csproj - Try offline if network is slow
Solution:
- Ensure Windows 10 Build 19041 or later
- Check Windows App SDK installation
- Run as Administrator
- Verify winget is installed
Solution:
- Close any running instances of WinGetUI
- Clear bin/obj folders:
dotnet clean - Run terminal as Administrator
- Try building again
WinGetUI/
├── Models/ → Data models (Package.cs, OperationResult.cs)
├── Services/ → Business logic (WingetService.cs)
├── Views/ → UI pages (Install, Update, Browse, Search)
├── App.xaml(.cs) → Application startup
└── MainWindow.xaml → Main window
- Each view has corresponding
.xamland.xaml.csfiles - Modify layout, colors, and controls in
.xamlfiles - Add event handlers and logic in
.xaml.csfiles
- Make changes to XAML or C#
- Press
Alt+Shift+F5to hot reload - Changes appear instantly
- Save your changes
- Press
Ctrl+Shift+Bto build - Press
F5to run
- Click on line number in code editor
- Press
F9on the line - Red dot appears indicating breakpoint
- Press
F5to start debugging - Application stops at breakpoints
- Use Debug toolbar or
F10(step),F11(step into),Shift+F11(step out)
- Output messages with:
Debug.WriteLine("message"); - View in Debug → Windows → Output
- Hover over variables to see values
- Use Debug → Windows → Locals to view all variables
- Use Debug → Windows → Watch to monitor specific values
-
Package.cs - Represents a software package
- Properties: Id, Name, Version, Publisher, Status, etc.
- Implements IComparable for sorting
-
OperationResult.cs - Result of package operations
- Success/Error status
- Messages and error details
- Exit codes from winget
- WingetService.cs - Core winget integration
- Methods: GetInstalledPackagesAsync(), SearchPackagesAsync(), InstallPackageAsync(), etc.
- Executes winget commands via Process
- Parses console output into Package objects
- Handles errors gracefully
-
InstallView.xaml(.cs) - Install new programs
- Search functionality
- Package list display
- Install button with confirmation
-
UpdateView.xaml(.cs) - Update existing programs
- List of upgradable packages
- Single and batch update
- Refresh button
-
BrowseView.xaml(.cs) - Browse installed programs
- View all installed packages
- Sort by Name, ID, Version
- Uninstall functionality
-
SearchView.xaml(.cs) - Search programs
- Real-time search
- Search by name or ID
- Quick install from results
- Edit
Views/InstallView.xamlto add UI elements - Add event handlers to
Views/InstallView.xaml.cs - Add methods to
Services/WingetService.csif needed - Test the feature
- Create new
IComparer<Package>inViews/BrowseView.xaml.cs - Add sort button to XAML
- Implement click handler that applies sorting
- Test the sorting
- Add property to
Models/Package.cs - Update parsing in
WingetService.ParsePackageList() - Update XAML templates to display new property
- Test with actual packages
- Wrap code in try-catch blocks
- Log errors with
Debug.WriteLine() - Show user-friendly messages in dialogs
- Test error scenarios
- All winget calls use async/await
- Never block UI thread
- Use
LoadingProgressindicators during operations
- Store search results to avoid repeated queries
- Implement caching in
WingetServicefor frequently accessed data
- ListView uses data virtualization by default
- Large lists render efficiently
- Install a package
- Update a package
- Update all packages
- Browse and sort packages
- Search for packages by name
- Search for packages by ID
- Uninstall a package
- Confirm dialogs work correctly
- Error handling displays properly
- No packages available
- Search with no results
- Install/update fails
- winget not installed
- Invalid package IDs
- Network interruptions
dotnet publish WinGetUI\WinGetUI.csproj `
--configuration Release `
--runtime win-x64 `
--self-contained true- Build release version
- Create installer (MSI/MSIX) using WiX Toolset
- Sign with code signing certificate
- Distribute via GitHub Releases or Microsoft Store
- Windows App SDK Documentation
- WinUI 3 Documentation
- Windows Package Manager Documentation
- .NET Documentation
- XAML Basics
Q: Build fails with "Microsoft.WindowsAppSDK not found"
A: Run dotnet workload install windowsdesktop then dotnet restore
Q: App crashes immediately on startup A: Ensure Windows 10 Build 19041+, winget installed, and running as admin
Q: Search/Install/Update buttons don't work
A: Verify winget is installed: winget --version
Q: Slow performance when listing packages A: Normal behavior with many packages. Add caching for improvements.
Happy developing! 🚀 For issues, check the main README.md