A .NET library designed to manage .NET MAUI projects programmatically. This library provides a simple and efficient way to create, build, run, and manage .NET MAUI applications across different platforms.
- Create new MAUI projects
- Build existing MAUI projects
- Restore NuGet packages
- Run applications on different platforms (Windows, Android, iOS, MacCatalyst)
- Get available target platforms for the project
- Delete projects and clean up resources
- Cross-platform support (Windows and macOS)
- Event-based command execution tracking
You can install the package via NuGet:
dotnet add package MAUIProjectManagerLibHere's a basic example of how to use the MAUI Project Manager:
var projectManager = new ProjectManager();
// Set up event handlers
projectManager.CommandStarted += (s, cmd) => Console.WriteLine($"Command started: {cmd}");
projectManager.CommandCompleted += (s, cmd) => Console.WriteLine($"Command completed: {cmd}");
projectManager.CommandErrorReceived += (s, error) => Console.WriteLine($"Error: {error}");
projectManager.CommandOutputReceived += (s, output) => Console.WriteLine(output);
// Set project directory
await projectManager.SetProjectDirectory("C:\\MyMauiProject");
// Create a new MAUI project
await projectManager.CreateAsync();
// Build the project
await projectManager.BuildAsync();
// Get available target platforms
var platforms = await projectManager.GetTargetPlatformsAsync();
foreach (var platform in platforms)
{
Console.WriteLine($"Platform: {platform.Key}, Framework: {platform.Value}");
}
// Run on specific platform
await projectManager.RunAsync("net8.0-windows10.0.19041.0");The library supports managing MAUI projects for the following platforms:
- Windows
- Android
- iOS
- MacCatalyst
- Tizen (when enabled)
- .NET 8.0 or higher
- .NET MAUI workload installed
- Required platform SDKs for the target platforms you want to build for
The library provides comprehensive error handling through events:
CommandErrorReceived: Triggered when an error occurs during command executionCommandOutputReceived: Provides command output informationCommandStarted: Indicates when a command starts executingCommandCompleted: Signals command completion
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
- Built with .NET MAUI
- Supports cross-platform development
- Designed for programmatic project management