davidortinau/maui-skills/xamarin-android-migration
Claude Code and agent skill by davidortinau/maui-skills
- community
Checking that the SKILL.md file is still in the repository.
**WORKFLOW SKILL** - Guide for migrating Xamarin.Android native apps to .NET for Android. Covers SDK-style project conversion, target framework monikers, MSBuild property changes, AndroidManifest.xml updates, NuGet dependency compatibility, Android binding library migration, Xamarin.Essentials in native apps, .NET CLI support, and platform-specific gotchas. USE FOR: "migrate Xamarin.Android", "upgrade Xamarin.Android to .NET", "Xamarin.Android to .NET for Android", "Android project migration", "Android binding library migration", "convert Android project to SDK-style", "AndroidSupportedAbis to RuntimeIdentifiers". DO NOT USE FOR: migrating Xamarin.Forms apps (use xamarin-forms-migration), migrating Xamarin.iOS apps (use xamarin-ios-migration), creating new MAUI apps from scratch (use feature-specific MAUI skills).
Install
npx vskill@latest install davidortinau/maui-skills/xamarin-android-migrationSKILL.md
Xamarin.Android → .NET for Android Migration
For SDK-style project templates, MSBuild property tables, ABI conversion, namespace mappings, and CLI commands, see references/android-migration-api.md.
⚠️ Field-tested advice: Android migration is significantly harder than iOS.Expect more UI bugs, OEM-specific rendering differences, and issues notreproducible on emulators. Test on physical devices.
Migration Workflow
- Create new .NET for Android project (
dotnet new android) - Copy code and resources into the new project
- Update MSBuild properties (see
references/android-migration-api.md) - Update AndroidManifest.xml — remove
<uses-sdk>, use csproj properties - Delete
Resource.designer.cs(regenerated automatically) - Update NuGet dependencies
- Migrate binding libraries (if applicable)
- Replace Xamarin.Essentials with
<UseMauiEssentials>true</UseMauiEssentials> - Handle encoding changes
- Delete
bin//obj/, build, test on physical devices
Strategy: Create a new project and copy code into it — don't edit the existing project file in place.
Critical Gotchas
⚠️ Remove <uses-sdk> from AndroidManifest.xml
⚠️ Delete Resource.designer.cs
This file is auto-generated. Leftover copies from Xamarin cause duplicate symbol errors. Delete it — it will be regenerated.
⚠️ No .dll.config or .exe.config Support
.dll.config and <dllmap> are not supported in .NET Core. If your app uses System.Configuration.ConfigurationManager, migrate to appsettings.json or platform preferences.
⚠️ Essentials: Override Permissions in Every Activity
⚠️ AndroidManifest.xml Location Changed
AndroidManifest.xml is now in the project root (not Properties/). The SDK-style project finds it there by default.
Platform-Specific Pitfalls
| Pitfall | Impact | Mitigation | |
|---|---|---|---|
| OEM rendering differences | UI bugs not visible on emulators | Test on physical devices from multiple vendors | |
| Shadow rendering varies by OEM/API level | Inconsistent shadow appearance | Implement shadows in platform-specific handler code | |
| Android Wear references | Not supported in .NET for Android | Remove Wear project references | |
MAndroidI18n removed | Encoding errors at runtime | Replace with System.Text.Encoding.CodePages NuGet | |
AotAssemblies deprecated | Build warnings | Use RunAOTCompilation instead | |
jar2xml not supported | Binding library build failures | Use default class-parse parser | |
DebugType=full not supported | Build errors | Use default portable |
NuGet Compatibility Note
Android is unique: packages targeting monoandroid still work on .NET for Android. No recompilation needed for most Android-specific packages. This is NOT true for iOS/Mac.
If no compatible version exists:
- Recompile with .NET TFMs (if you own it)
- Look for a preview .NET version
- Replace with a .NET-compatible alternative
API Currency Warning
If your migrated app will also adopt .NET MAUI controls (e.g., via UseMaui), check the maui-current-apis skill for deprecated MAUI APIs to avoid (ListView, Frame, Device.*, etc.).
Quick Checklist
- ☐ Created new .NET for Android project (
dotnet new android) - ☐ Set
TargetFrameworktonet8.0-android(or later) - ☐ Set
SupportedOSPlatformVersionfor minimum SDK - ☐ Converted
AndroidSupportedAbis→RuntimeIdentifiers - ☐ Removed
<uses-sdk>from AndroidManifest.xml - ☐ Copied source, resources, and project properties
- ☐ Deleted
Resource.designer.cs,bin/,obj/ - ☐ Updated NuGet dependencies
- ☐ Added
UseMauiEssentials+Platform.Init()if using Essentials - ☐ Overridden
OnRequestPermissionsResultin every Activity - ☐ Replaced
MAndroidI18nwithSystem.Text.Encoding.CodePages - ☐ Verified AOT settings (
RunAOTCompilation, notAotAssemblies) - ☐ Tested on physical Android device(s) from multiple vendors
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/maui-skills/skills/xamarin-android-migration/SKILL.md
Popularity
- Repository stars
- 96
- Repository forks
- 14
- 7-day trend score
- 23
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 22 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/davidortinau/maui-skills/xamarin-android-migration)