Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/workflows/_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Build
on:
workflow_call:
inputs:
project-path:
required: true
type: string
description: 'Path to the solution filter or project to build'
project-name:
required: true
type: string
description: 'Human-readable name for artifact naming'
run-tests:
required: false
type: boolean
default: true
pack:
required: false
type: boolean
default: false

jobs:
build:
strategy:
matrix:
os: [macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json

- name: Install workloads
run: dotnet workload install maui macos

- name: Restore
run: dotnet restore ${{ inputs.project-path }}

- name: Build
run: dotnet build ${{ inputs.project-path }} -c Release --no-restore

- name: Test
if: inputs.run-tests
run: dotnet test ${{ inputs.project-path }} -c Release --no-build --no-restore --logger trx --results-directory TestResults

- name: Upload test results
if: inputs.run-tests && always()
uses: actions/upload-artifact@v4
with:
name: test-results-${{ inputs.project-name }}-${{ matrix.os }}
path: TestResults/**/*.trx

- name: Pack
if: inputs.pack && matrix.os == 'windows-latest'
run: dotnet pack ${{ inputs.project-path }} -c Release --no-build -o ./artifacts

- name: Upload packages
if: inputs.pack && matrix.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: packages-${{ inputs.project-name }}
path: ./artifacts/*.nupkg
32 changes: 32 additions & 0 deletions .github/workflows/ci-devflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI - DevFlow

on:
push:
branches: [main]
paths:
- 'src/DevFlow/**'
- 'eng/**'
- 'Directory.Build.props'
- 'Directory.Build.targets'
- 'Directory.Packages.props'
- 'global.json'
- 'NuGet.config'
pull_request:
branches: [main]
paths:
- 'src/DevFlow/**'
- 'eng/**'
- 'Directory.Build.props'
- 'Directory.Build.targets'
- 'Directory.Packages.props'
- 'global.json'
- 'NuGet.config'

jobs:
build:
uses: ./.github/workflows/_build.yml
with:
project-path: src/DevFlow/DevFlow.slnf
project-name: devflow
run-tests: true
pack: true
97 changes: 97 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# Contributing to .NET MAUI Labs

Thank you for your interest in contributing! This repository hosts experimental .NET MAUI packages that are in active development.

## Repository Structure

```
maui-labs/
├── src/ # Source code, organized by product
│ └── {Product}/ # Each product has its own folder
│ ├── Version.props # Per-product version
│ ├── {Product}.slnf # Solution filter for this product
│ └── ...projects...
├── samples/ # Sample apps (not shipped)
├── playground/ # Manual verification/scratch apps
├── docs/ # Documentation per product
├── eng/ # Shared build infrastructure
└── MauiLabs.sln # Full solution
```

## Getting Started

### Prerequisites

- [.NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0) (see `global.json` for exact version)
- MAUI workload: `dotnet workload install maui`

### Building

```bash
# Build everything
dotnet build MauiLabs.sln

# Build just one product (e.g., DevFlow)
dotnet build src/DevFlow/DevFlow.slnf

# Build a specific project
dotnet build src/DevFlow/Microsoft.Maui.DevFlow.Agent.Core/
```

### Running Tests

```bash
# All tests
dotnet test MauiLabs.sln

# Just DevFlow tests
dotnet test src/DevFlow/Microsoft.Maui.DevFlow.Tests/
```

### Opening in an IDE

For focused development on a single product, open the solution filter:

- **DevFlow**: `src/DevFlow/DevFlow.slnf`

For the full repo, open `MauiLabs.sln`.

## Adding a New Product

1. Create `src/{NewProduct}/` with:
- `Version.props` (copy from an existing product)
- Project folders with `.csproj` files
- Test project
- `{NewProduct}.slnf` solution filter
2. Add projects to `MauiLabs.sln`
3. Add any new package versions to `Directory.Packages.props`
4. Add path filter entry in `.github/workflows/ci.yml`
5. Create `.github/workflows/release-{newproduct}.yml`

## Versioning

Each product manages its own version in `src/{Product}/Version.props`:

```xml
<Project>
<PropertyGroup>
<VersionPrefix>1.0.0</VersionPrefix>
<VersionSuffix>preview.1</VersionSuffix>
</PropertyGroup>
</Project>
```

## Package Management

This repo uses [Central Package Management](https://learn.microsoft.com/nuget/consume-packages/central-package-management). All package versions are defined in `Directory.Packages.props` at the repo root. Individual `.csproj` files reference packages without specifying versions.

## Code Style

- `ImplicitUsings` and `Nullable` are enabled repo-wide
- Follow standard .NET naming conventions

## Pull Requests

- PRs trigger CI builds only for products with changed files
- Ensure tests pass before requesting review
- Update `Version.props` if your change warrants a version bump
25 changes: 25 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<Project>

<PropertyGroup>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<!-- Import shared packaging properties for NuGet packages -->
<Import Project="$(MSBuildThisFileDirectory)eng/Common.props" />

<!-- Common SupportedOSPlatformVersion for all MAUI projects -->
<PropertyGroup Condition="'$(UseMaui)' == 'true'">
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">24.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
</PropertyGroup>

<!-- macOS AppKit (net10.0-macos) support -->
<PropertyGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'macos'">
<SupportedOSPlatformVersion>14.0</SupportedOSPlatformVersion>
<DefineConstants>$(DefineConstants);MACOS</DefineConstants>
</PropertyGroup>

</Project>
5 changes: 5 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>

<Import Project="$(MSBuildThisFileDirectory)eng/Common.targets" />

</Project>
65 changes: 65 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<Project>

<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
</PropertyGroup>

<!-- Shared MAUI version -->
<PropertyGroup>
<MauiVersion>10.0.31</MauiVersion>
</PropertyGroup>

<!-- .NET MAUI -->
<ItemGroup Label="MAUI">
<PackageVersion Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
<PackageVersion Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)" />
<PackageVersion Include="Microsoft.Maui.Essentials" Version="$(MauiVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="$(MauiVersion)" />
</ItemGroup>

<!-- Microsoft Extensions -->
<ItemGroup Label="Extensions">
<PackageVersion Include="Microsoft.Extensions.Http" Version="10.0.3" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="10.0.3" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.3" />
<PackageVersion Include="Microsoft.Extensions.Logging.Debug" Version="10.0.3" />
</ItemGroup>

<!-- DevFlow dependencies -->
<ItemGroup Label="DevFlow">
<PackageVersion Include="Fizzler" Version="1.3.0" />
<PackageVersion Include="SkiaSharp" Version="3.119.0" />
<PackageVersion Include="Spectre.Console" Version="0.54.0" />
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
<PackageVersion Include="System.Text.Json" Version="9.0.6" />
<PackageVersion Include="Websocket.Client" Version="5.1.2" />
<PackageVersion Include="XenoAtom.Terminal.UI" Version="1.1.1" />
<PackageVersion Include="ModelContextProtocol" Version="1.0.0" />
<PackageVersion Include="Interop.UIAutomationClient" Version="10.19041.0" />
</ItemGroup>

<!-- Platform extensions -->
<ItemGroup Label="Platform">
<PackageVersion Include="Platform.Maui.MacOS" Version="0.2.0-beta.2" />
<PackageVersion Include="Platform.Maui.MacOS.BlazorWebView" Version="0.2.0-beta.2" />
<PackageVersion Include="Platform.Maui.MacOS.Essentials" Version="0.2.0-beta.19" />
<PackageVersion Include="Platform.Maui.Linux.Gtk4" Version="0.5.0" />
<PackageVersion Include="Platform.Maui.Linux.Gtk4.BlazorWebView" Version="0.5.0" />
<PackageVersion Include="Platform.Maui.Linux.Gtk4.Essentials" Version="0.5.0" />
</ItemGroup>

<!-- Testing -->
<ItemGroup Label="Testing">
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageVersion Include="xunit" Version="2.9.3" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.4" />
<PackageVersion Include="coverlet.collector" Version="6.0.4" />
</ItemGroup>

<!-- Source Link -->
<ItemGroup Label="SourceLink">
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
</ItemGroup>

</Project>
Loading
Loading