Skip to content

Update Quickstart for DOTNET to v5 and .NET 10.0#238

Merged
Aaron LaBeau (biozal) merged 15 commits into
mainfrom
da-138-update-v5-dotnet
May 5, 2026
Merged

Update Quickstart for DOTNET to v5 and .NET 10.0#238
Aaron LaBeau (biozal) merged 15 commits into
mainfrom
da-138-update-v5-dotnet

Conversation

@biozal
Copy link
Copy Markdown
Contributor

@biozal Aaron LaBeau (biozal) commented Jan 31, 2026

Summary

Updates the .NET quickstart projects (MAUI, TUI, WinForms) to Ditto SDK 5.0.0 and migrates them from .NET 9 → .NET 10. Includes the new DittoConfig / Ditto.Open initialization API, server-based connect with token-expiration auth handler, and a refresh of the MAUI UI test harness for .NET 10 compatibility.

Linked: DA-138

Changes

Ditto SDK 4.14.3 → 5.0.0 (dotnet-maui, dotnet-tui, dotnet-winforms)

  • Replaced DittoIdentity.OnlinePlayground(...) + new Ditto(...) + UpdateTransportConfig(...) with the new initialization flow:

var config = new DittoConfig(
appId,
new DittoConfigConnect.Server(new Uri(authUrl)),
persistenceDirectory);
var ditto = Ditto.Open(config);

  • Wired up ditto.Auth.ExpirationHandler to call LoginAsync(token, DittoAuthenticationProvider.Development) on token expiry (required when using server-based connect).
  • Removed DisableSyncWithV3() and the DQL_STRICT_MODE toggle — neither is required in 5.0.
  • New imports added where needed: DittoSDK.Auth, DittoSDK.Store, DittoSDK.Sync, DittoSDK.Logging.
  • API reference links in all three READMEs updated to https://software.ditto.live/dotnet/Ditto/5.0.0/api-reference/.

.NET 9 → .NET 10

  • Removed dotnet-maui/global.json (no longer pinning an SDK band).
  • WinForms project added SystemAware and true.

MAUI Android: minSDK and SDK level bumps

  • AndroidManifest.xml: minSdkVersion 23 → 24, targetSdkVersion 35 → 36, compileSdkVersion 35 → 36.
  • DittoMauiTasksApp.csproj: SupportedOSPlatformVersion(android) 23.0 → 24.0.
  • Reformatted MainActivity and manifest for readability.

MAUI UI tests refreshed for .NET 10 (UITests.{Shared,iOS,Android})

  • Target framework net9.0 → net10.0.
  • Microsoft.NET.Test.Sdk 17.12.0 → 18.5.1 (required for the .NET 10 testhost).
  • NUnit 4.2.2 → 4.6.0, NUnit3TestAdapter 4.6.0 → 6.2.0.
  • Dropped runtime workaround on Microsoft.NET.Test.Sdk in UITests.iOS / UITests.Android — no longer needed on the new SDK.
  • Hardcoded net9.0-ios / net9.0-android paths in iOSTaskSearchTests.GetAppPath() and AndroidTaskSearchTests.GetAppPath() → net10.0-*.
  • New APPIUM_UDID env-var override in AndroidTaskSearchTests to disambiguate when multiple devices/emulators are connected (e.g., an emulator + an unauthorized physical device).

MAUI app polish

  • ApplicationTitle changed to DittoMauiTasksApp for project consistency; iOS/maccatalyst keep CFBundleDisplayName = "QS Tasks" via a platform-specific .
  • TasksPageviewModel: removed ORDER BY title ASC from the default SELECT (Ditto store ordering is handled at the UI layer instead).

dotnet-tui (DittoDotNetTasksConsole)

  • Migrated TasksPeer to the new DittoConfig API with Auth expiration handler, removed temp-dir persistence (now uses default), _ditto field marked readonly.
  • Removed DisableStrictMode().

dotnet-winforms (DittoTasksApp)

  • TasksPeer migrated to new DittoConfig + Auth expiration handler API; class moved into DittoTasksApp namespace; _ditto field marked readonly.
  • Re-enabled DittoLogger.IsEnabled = true (the WinForms app doesn't use Terminal.Gui, so log output to stderr is fine).

Documentation (dotnet-maui/README.md, dotnet-tui/README.md, dotnet-winforms/README.md)

  • Bumped install link to .NET 10 SDK.
  • Bumped API reference link to Ditto 5.0.0.
  • Build commands updated from net9.0-* to net10.0-*.
  • Added new sections to dotnet-maui/README.md:
    • Environment variables for JAVA_HOME and ANDROID_HOME (Homebrew OpenJDK 17 + Android Studio paths).
    • Xcode override documenting -p:ValidateXcodeVersion=false for cases where the installed Xcode is newer than the workload-recommended version.
    • Running the UI Tests Locally with the full Appium 2 setup (xcuitest + uiautomator2 drivers), the APPIUM_UDID override, and the -p:EmbedAssembliesIntoApk=true gotcha for
      installing the Android Debug APK manually (Mono Fast Deployment otherwise fails with No assemblies found ... Exiting...).
  • WinForms README: ".NET 8" prerequisite text → ".NET 10", framework target reference link refreshed.

Test plan

  • Reviewer pulls the branch, sets JAVA_HOME + ANDROID_HOME, and runs dotnet build for each .NET project — should be clean.
  • cd dotnet-tui && dotnet test — builds and the integration test runs (fails only on missing DITTO_CLOUD_TASK_TITLE, which is expected unless the CI env provides it).
  • iOS: dotnet build DittoMauiTasksApp/DittoMauiTasksApp.csproj -f net10.0-ios -p:ValidateXcodeVersion=false -t:Run boots the simulator and launches the app; the app authenticates
    and shows the seeded tasks.
  • Android: with JAVA_HOME set and an emulator booted, dotnet build ... -f net10.0-android -t:Run deploys and launches; tasks render after sync.
  • CI: BrowserStack workflow runs against a real seeded DITTO_CLOUD_TASK_TITLE and the tests go green.

@biozal Aaron LaBeau (biozal) changed the title Draft: Update Quickstart for DOTNET to v5 - DO NOT MERGE Update Quickstart for DOTNET to v5 and .NET 10.0 May 5, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the .NET quickstarts to Ditto 5.0.0 and .NET 10, while refreshing MAUI UI test infrastructure and moving the samples to the newer Ditto initialization/auth flow. In this repo, that primarily touches the MAUI, TUI, and WinForms quickstarts plus their docs/test projects.

Changes:

  • Upgrades WinForms, TUI, and MAUI projects from Ditto 4.x/.NET 9 to Ditto 5.0.0/.NET 10.
  • Replaces older Ditto initialization with DittoConfig/Ditto.Open and adds auth expiration handlers.
  • Refreshes MAUI UI tests/docs for .NET 10 and updates Android/iOS build paths and SDK targets.

Reviewed changes

Copilot reviewed 26 out of 37 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
dotnet-winforms/TasksApp/ToDoTaskEditorForm.Designer.cs Regenerated WinForms editor layout and control definitions.
dotnet-winforms/TasksApp/TasksPeer.cs Migrates WinForms Ditto setup to the new config/auth flow.
dotnet-winforms/TasksApp/Program.cs Updates WinForms startup logging configuration.
dotnet-winforms/TasksApp/MainForm.cs Adds WinForms Ditto store import.
dotnet-winforms/TasksApp/DittoTasksApp.csproj Retargets WinForms app to .NET 10 / Ditto 5 and adds DPI settings.
dotnet-winforms/README.md Updates WinForms prerequisites and API reference docs.
dotnet-winforms/IntegrationTest/IntegrationTest.csproj Retargets WinForms integration test project to .NET 10 / Ditto 5.
dotnet-tui/README.md Updates TUI prerequisites and API reference docs.
dotnet-tui/DittoDotNetTasksConsole/TasksPeer.cs Migrates TUI Ditto setup to the new config/auth flow and removes temp persistence.
dotnet-tui/DittoDotNetTasksConsole/Program.cs Adds Ditto logging import for the TUI app.
dotnet-tui/DittoDotNetTasksConsole/DittoDotNetTasksConsole.csproj Retargets TUI app to .NET 10 / Ditto 5 and sets language version.
dotnet-tui/DittoDotNetTasksConsole/ditto-f5e954d9-0092-47a0-9a79-2829e767ba7b/ditto_replication/__ditto_store_lock_file Adds generated Ditto local replication lock artifact.
dotnet-tui/DittoDotNetTasksConsole/ditto-f5e954d9-0092-47a0-9a79-2829e767ba7b/ditto_auth/web.cbor Adds generated persisted Ditto web auth state.
dotnet-tui/DittoDotNetTasksConsole/ditto-f5e954d9-0092-47a0-9a79-2829e767ba7b/ditto_auth/site.cbor Adds generated persisted Ditto site identity data.
dotnet-tui/DittoDotNetTasksConsole/ditto-f5e954d9-0092-47a0-9a79-2829e767ba7b/ditto_auth/in_band.cbor Adds generated persisted Ditto in-band auth material.
dotnet-tui/DittoDotNetTasksConsole/ditto-f5e954d9-0092-47a0-9a79-2829e767ba7b/ditto_auth/__ditto_store_lock_file Adds generated Ditto auth lock artifact.
dotnet-tui/DittoDotNetTasksConsole/ditto-f5e954d9-0092-47a0-9a79-2829e767ba7b/ditto_attachments/__ditto_store_lock_file Adds generated Ditto attachments lock artifact.
dotnet-tui/DittoDotNetTasksConsole/ditto-f5e954d9-0092-47a0-9a79-2829e767ba7b/__ditto_version.txt Adds generated Ditto local store version metadata.
dotnet-tui/DittoDotNetTasksConsole/ditto-f5e954d9-0092-47a0-9a79-2829e767ba7b/__ditto_lock_file Adds generated top-level Ditto lock artifact.
dotnet-tui/DittoDotNetTasksConsole.Tests/DittoDotNetTasksConsole.Tests.csproj Retargets TUI tests to .NET 10 / Ditto 5.
dotnet-maui/UITests.Shared/UITests.Shared.csproj Updates shared MAUI UI test target/framework packages.
dotnet-maui/UITests.iOS/UITests.iOS.csproj Updates iOS UI test target/framework packages.
dotnet-maui/UITests.iOS/iOSTaskSearchTests.cs Updates iOS app lookup paths to net10 outputs.
dotnet-maui/UITests.Android/UITests.Android.csproj Updates Android UI test target/framework packages.
dotnet-maui/UITests.Android/AndroidTaskSearchTests.cs Updates Android app lookup paths and adds optional UDID targeting.
dotnet-maui/README.md Refreshes MAUI build/test instructions for .NET 10 and local Appium runs.
dotnet-maui/DittoMauiTasksApp/ViewModels/TasksPageviewModel.cs Removes query ordering and adds Ditto sync import.
dotnet-maui/DittoMauiTasksApp/Platforms/Android/MainActivity.cs Reformats Android activity attributes.
dotnet-maui/DittoMauiTasksApp/Platforms/Android/AndroidManifest.xml Raises Android SDK levels and reformats manifest.
dotnet-maui/DittoMauiTasksApp/MauiProgram.cs Migrates MAUI Ditto initialization to DittoConfig + auth expiration handling.
dotnet-maui/DittoMauiTasksApp/DittoMauiTasksApp.csproj Retargets MAUI app to .NET 10 / Ditto 5 and adjusts platform/display-name settings.
Files not reviewed (1)
  • dotnet-winforms/TasksApp/ToDoTaskEditorForm.Designer.cs: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread dotnet-maui/DittoMauiTasksApp/ViewModels/TasksPageviewModel.cs
Comment thread dotnet-tui/DittoDotNetTasksConsole/TasksPeer.cs Outdated
Comment thread dotnet-winforms/README.md
@biozal Aaron LaBeau (biozal) requested a review from a team as a code owner May 5, 2026 18:17
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@biozal Aaron LaBeau (biozal) merged commit 753d694 into main May 5, 2026
13 of 16 checks passed
@biozal Aaron LaBeau (biozal) deleted the da-138-update-v5-dotnet branch May 5, 2026 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants