Skip to content

Latest commit

 

History

History
178 lines (129 loc) · 4.08 KB

File metadata and controls

178 lines (129 loc) · 4.08 KB

Developer Guide

This guide describes setup, linting/formatting, and deployment workflow for this .NET 10 WASM app with Android tooling.

Prerequisites

Install Taskfile

Install Taskfile using either winget or npm:

# Option 1 (Windows):
winget install Task.Task

# Option 2 (Node.js):
npm install -g @go-task/cli

Verify installation:

task --version

Android setup

  1. Install Android Studio.
  2. Open SDK Manager and install:
  • Android SDK Platform (latest)
  • Android SDK Build-Tools
  • Android SDK Command-line Tools
  • Android Emulator (optional)
  1. Ensure adb works:
adb version

Common commands

Use Taskfile commands:

task restore
task build
task build:all
task run
task run:server
task run:client
task test
task format
task lint
task clean

Chat room architecture

  • Client UI: Pages/Chat.razor
  • API backend: androidwasm.ChatServer
  • Persistence: SQLite via EF Core
  • Database file: androidwasm.ChatServer/chat-history.db

Run both apps in separate terminals:

# Terminal 1
task run:server

# Terminal 2
task run:client

Default local URLs:

  • Client: https://localhost:7218
  • Chat API: https://localhost:7121

Linting and formatting

This repository uses dotnet format and compiler analyzers.

Install/update formatting and analysis tools:

# Ensure SDK workloads and tools are current
dotnet workload update

# Optional: install dotnet-format as a global tool if needed
dotnet tool install -g dotnet-format
# or update if already installed
dotnet tool update -g dotnet-format
  • Formatting:
task format
  • Lint/analyzers (warnings as errors):
task lint

If task format fails because dotnet format is missing, run:

dotnet format --version

Deployment notes (Android + WASM)

This project builds WASM assets under wwwroot/_framework. A common Android integration path is:

  1. Build app assets:
task build
  1. Package generated static assets in an Android app container (WebView or WASM runtime-based host).
  2. Use ADB for deployment:
adb devices
adb install path/to/app-debug.apk

Android Studio on an Azure developer VM

Use this workflow when developing from an Azure Windows VM/Dev Box.

  1. Provision a Windows 11 VM (or Dev Box) with at least 4 vCPU and 16 GB RAM.
  2. Install Android Studio and .NET 10 SDK on the VM.
  3. Install Android SDK components from Android Studio SDK Manager:
  • Android SDK Platform
  • Android SDK Build-Tools
  • Android SDK Platform-Tools
  • Android SDK Command-line Tools
  1. Install Taskfile (winget install Task.Task or npm install -g @go-task/cli).
  2. Open this repo in VS Code or Android Studio and run:
task restore
task build
  1. For device testing from the VM:
  • Preferred: connect a physical Android device over adb tcpip on the same network/VPN.
  • Emulator note: nested virtualization and GPU acceleration may be limited depending on VM SKU/policy; if emulator performance is poor, use a physical device or an external test device farm.
  1. Deploy APK from VM:
adb devices
adb install path/to/app-debug.apk

.NET 10 feature examples in workflow

  • SDK-first CLI workflow with dotnet restore/build/test/format
  • Analyzer-driven quality gates via -warnaserror
  • Test platform readiness in TESTS.md using Microsoft Testing Platform guidance

References