Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 4, 2025

Provides a complete roadmap for migrating FieldWorks from .NET Framework 4.6.2 to .NET 8, including per-component assessments, a phased migration strategy, detailed risk analysis with alternative approaches, and three comprehensive migration proposals.

Analysis Scope

  • 62 individual project assessments (DOTNET_MIGRATION.md next to each COPILOT.md)
  • Master strategy document (Src/DOTNET_MIGRATION.md - 700+ lines)
  • Repository overview (MIGRATION_ANALYSIS_README.md)
  • Top 5 Highest Risks with detailed mitigation strategies
  • 5 detailed risk analysis documents (MIGRATION-RISK-<N>.md) with 2-3 approaches each
  • 3 comprehensive migration proposals (MIGRATION-PROPOSAL-<A/B/C>.md)

Key Findings

Project Categorization:

  • 14 Native C++ (no migration - P/Invoke validation only)
  • 11 Pure managed, no UI (priority targets for Phase 2)
  • 37 WinForms projects (migrate to .NET 8 keeping WinForms)
  • 0 C++/CLI (major blocker eliminated)

Complexity Distribution:

  • Very Low/Low: 25 projects (1-5 days each)
  • Medium: 36 projects (1-2 weeks each)
  • High: 1 project (2-4 weeks)

Migration Strategy

6-phase approach over 12-18 months:

  1. Foundation setup (Weeks 1-4)
  2. Core libraries - pure managed, no UI (Weeks 5-12) ← Start here
  3. Utility libraries (Weeks 13-20)
  4. UI framework - keep WinForms (Weeks 21-32)
  5. Application shells (Weeks 33-40)
  6. Final polish (Weeks 41-52)

Key decisions:

  • Keep WinForms initially (Windows-only .NET 8 support)
  • Defer Avalonia migration to separate phase
  • Maintain parallel .NET Framework/.NET 8 builds during transition
  • Minimize interface boundaries between old and new code

Priority migration candidates (Phase 2):

  • CacheLight, InstallValidator, GenerateHCConfig
  • ManagedVwDrawRootBuffered, ManagedLgIcuCollator
  • Common/ViewsInterfaces, Common/ScriptureUtils
  • ProjectUnpacker, LexText/ParserCore, Utilities/FixFwData

Top 5 Highest Risks

Detailed analysis based on code review, COPILOT.md files, and research into .NET 8 migration gotchas:

Risk #1: Native Views P/Invoke Compatibility ⚠️ CRITICAL

  • 66.7K lines of native C++ rendering engine
  • COM interop changes, marshaling rules, delegate callbacks
  • Effort: 4-6 weeks
  • Impact: Breaks all text display if not handled correctly
  • Detailed Analysis → with 3 approaches

Risk #2: WinForms Designer & Custom Controls ⚠️ HIGH

  • Out-of-process designer architecture breaks traditional patterns
  • Affects all 37 WinForms projects including LexTextDll (high complexity)
  • DataGridView customization, design-time serialization at risk
  • Effort: 6-8 weeks
  • Detailed Analysis → with 3 approaches including Avalonia acceleration

Risk #3: XCore Framework ⚠️ HIGH

  • Reflection-heavy plugin architecture
  • Mediator and colleague patterns at risk
  • Effort: 4-6 weeks
  • Detailed Analysis → with 3 approaches including MVVM replacement

Risk #4: Resources/Localization ⚠️ MEDIUM-HIGH

  • Large .resx files (215KB HelpTopicPaths)
  • Crowdin integration must continue working
  • Graphite removal opportunity identified
  • Effort: 3-4 weeks
  • Detailed Analysis → with 3 approaches including modernization

Risk #5: Database/ORM ⚠️ MEDIUM

  • LCModel data access layer
  • SQL Client changes, XML serialization
  • Effort: 3-4 weeks
  • Detailed Analysis → with 3 approaches

Total Risk Mitigation Effort: 20-28 weeks (~5-7 months)

Migration Proposals

Three comprehensive strategies with different risk/timeline profiles:

Proposal A: Conservative .NET 8-Only Migration

  • Timeline: 6-9 months
  • Risk: LOW
  • Team: 3-4 developers
  • Focus: .NET 8 only, keep WinForms, Windows-only
  • Full Proposal →

Proposal B: Combined .NET 8 + Avalonia Migration

  • Timeline: 12-18 months
  • Risk: MEDIUM-HIGH
  • Team: 5-7 developers
  • Focus: .NET 8 + full Avalonia migration, cross-platform
  • Implements: MIGRATION-PLAN-0.md systematically
  • Removes: GeckoFX, Graphite, legacy complexity
  • Full Proposal →

Proposal C: Pragmatic Hybrid Approach ⭐ RECOMMENDED

  • Timeline: 9-15 months (with decision gates)
  • Risk: MEDIUM
  • Team: 4-5 developers
  • Focus: Start conservative, pilot Avalonia, pivot based on validation
  • Decision Gates: Months 3, 9, and 12
  • Full Proposal →
Aspect Proposal A Proposal B Proposal C ⭐
Timeline 6-9 months 12-18 months 9-15 months
Team 3-4 devs 5-7 devs 4-5 devs
Risk LOW MEDIUM-HIGH MEDIUM
Cross-Platform No Yes Conditional
Avalonia Future Full Pilot/Optional
GeckoFX Removed No Yes Conditional
Graphite Removed No Yes Conditional

Per-Component Assessments

Each DOTNET_MIGRATION.md provides:

  • Current framework version and project type
  • Technology stack (WinForms, COM interop, native interop)
  • Complexity rating and effort estimate
  • Migration blockers and risks
  • Prerequisites and dependencies
  • Specific migration recommendations

Example structure:

Src/CacheLight/DOTNET_MIGRATION.md
├─ Current State: v4.6.2, Library, Very Low complexity
├─ Technology: Pure managed, no UI dependencies
├─ Migration Blockers: None
├─ Strategy: Direct SDK-style migration
└─ Estimated Effort: 1-2 days

Resources Required

  • Timeline: 6-18 months (depending on proposal chosen)
  • Team: 3-7 dedicated developers (depending on proposal)
  • Infrastructure: CI/CD updates for .NET 8 builds
  • Risk Mitigation: Additional 5-7 months for addressing critical risks

Key Features of This Analysis

Comprehensive risk analysis - Each of 5 risks analyzed with 2-3 alternative approaches
Strategic alternatives - Three complete migration proposals with different risk profiles
Graphite removal - Addresses legacy complexity removal with modern tooling
Avalonia integration - References and implements MIGRATION-PLAN-0.md
Decision gates - Proposal C includes validation checkpoints
Cross-referenced - All documents link together for easy navigation

Original prompt

I have a desire to migrate everything from .NetFramework to .Net 8, moving slowly from WinForms and custom C++ to Avalonia in the process. This is a large and expansive job - I would like first to look through ALL projects (that is, folders with a COPILOT.md file in them) and estimate on a per-folder bases what would be needed to migrate to .net 8. I would like this information placed in a file called DOTNET_MIGRATION.md in each folder next to the COPILOT.md files. Then, I would like you to review all the DOTNET_MIGRATION.md files and come up with a sensible path forward for migration, ideally grouping things together to minimize interfaces between .net framework and .net 8. If possible, don't migrate from WinForms to Avalonia (yet - that migration will be later), but if it is unavoidable, then propose a path to migration.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.


This change is Reviewable

johnml1135 and others added 2 commits November 3, 2025 21:52
Refine AI onboarding and workflows:
* Update copilot-instructions.md with agentic workflow links and
clearer pointers to src-catalog and per-folder guidance (COPILOT.md).
* Tune native and installer instructions for mixed C++/CLI, WiX, and build
nuances (interop, versioning, upgrade behavior, build gotchas).

Spec kit improvements:
* Refresh spec.md and plan.md to align with the
feature-spec and bugfix agent workflows and FieldWorks conventions.
Inner-loop productivity:
* Extend tasks.json with quick checks for whitespace and commit
message linting to mirror CI and shorten feedback loops.

CI hardening for docs and future agent flows:
* Add lint-docs.yml to verify COPILOT.md presence per
Src/<Folder> and ensure folders are referenced in .github/src-catalog.md.
* Add agent-analysis-stub.yml (disabled-by-default) to
document how we will run prompts/test-failure analysis in CI later.

Locally run CI checks in Powershell
* Refactor scripts and add whitespace fixing algorithm
* Add system to keep track of changes needed to be reflected in
  COPILOT.md files.

git prune task
Copilot AI changed the title [WIP] Assess migration requirements for .Net 8 Add comprehensive .NET 8 migration analysis for all 62 FieldWorks components Nov 4, 2025
Copilot AI requested a review from johnml1135 November 4, 2025 19:38
Copilot finished work on behalf of johnml1135 November 4, 2025 19:38
@johnml1135
Copy link
Contributor

@copilot Add a section to the migration overview detailing the 5 highest risks including the project you identidied as high complexity. I would like you to not only review the COPILOT.md files for the worst projects, but review all the files in the folders themselves when detailing the worst or most complex issues. Search the internet for gotchas with the migration, especially around support for complex views in WinForms.

Copy link
Contributor Author

Copilot AI commented Nov 4, 2025

@copilot Add a section to the migration overview detailing the 5 highest risks including the project you identidied as high complexity. I would like you to not only review the COPILOT.md files for th...

Added comprehensive "Top 5 Highest Risks" section to Src/DOTNET_MIGRATION.md (commit d55f783).

The analysis includes:

Risk #1 (CRITICAL): Native Views rendering engine P/Invoke compatibility - 66.7K lines of C++ with COM interop, marshaling changes, and TSF integration risks

Risk #2 (HIGH): WinForms designer and custom controls - Out-of-process designer architecture breaks traditional design-time patterns, affecting all 37 WinForms projects including LexTextDll (the high complexity project identified)

Risk #3 (HIGH): XCore framework reflection-heavy plugin architecture - Mediator pattern and colleague discovery at risk

Risk #4 (MEDIUM-HIGH): Resource/localization infrastructure - Large .resx files and Crowdin integration must be validated

Risk #5 (MEDIUM): Database/ORM compatibility - LCModel data access with SQL Client and serialization changes

Each risk includes:

  • Affected projects (from COPILOT.md analysis and code review)
  • Specific technical gotchas discovered through research
  • Impact assessment
  • Detailed mitigation strategies
  • Effort estimates (20-28 weeks total for all risks)

Research sources include Microsoft .NET 8 breaking changes documentation, WinForms designer migration patterns, and COM interop gotchas.

Copilot AI changed the title Add comprehensive .NET 8 migration analysis for all 62 FieldWorks components Add comprehensive .NET 8 migration analysis with risk assessment for all 62 FieldWorks components Nov 4, 2025
Copilot finished work on behalf of johnml1135 November 4, 2025 19:48
@github-actions
Copy link

github-actions bot commented Nov 4, 2025

Agent analysis is currently a stub and does not execute prompts.
Intended workflow: run .github/prompts/test-failure-debug.prompt.md in analysis-only mode and post findings.
See .github/option3-plan.md for enablement steps.

@johnml1135
Copy link
Contributor

@copilot These risks look significant. Make a markdown file per risk called MIGRATION-RISK-.md and reference it. For each risk, think through 2-3 ways to address it. After considering all the main risks, update the main migration plan with 2-3 proposals on how to go about this transition. Name them MIGRATION-PROPOSAL-.md.
Of particular note, we will be moving away from Graphite. There is a lot of complexity that was built 15 years ago that may no longer be needed with more modern tooling. If the modern tooling can replace he code wholesale, then let's do it. I asked you about this before and you gave a detailed path forward (this is before the in-depth creation of the COPILOT.md files) - I put the content in MIGRATION-PLAN.0.md. Please reference that as well as you make alternative plans.

Copy link
Contributor Author

Copilot AI commented Nov 4, 2025

@copilot These risks look significant. Make a markdown file per risk called MIGRATION-RISK-.md and reference it. For each risk, think through 2-3 ways to address it. After considering all the...

Created detailed risk and proposal documents (commit 3eab498):

Risk Analysis Files (5 files):

  • MIGRATION-RISK-1-NATIVE-VIEWS-PINVOKE.md - 3 approaches for Views P/Invoke
  • MIGRATION-RISK-2-WINFORMS-DESIGNER.md - 3 approaches including Avalonia acceleration (references MIGRATION-PLAN-0.md)
  • MIGRATION-RISK-3-XCORE-FRAMEWORK.md - 3 approaches including MVVM replacement (implements P5.1-P5.3 from MIGRATION-PLAN-0.md)
  • MIGRATION-RISK-4-RESOURCES-LOCALIZATION.md - 3 approaches including Graphite removal
  • MIGRATION-RISK-5-DATABASE-ORM.md - 3 approaches for data layer

Migration Proposals (3 files):

  • MIGRATION-PROPOSAL-A-CONSERVATIVE-DOTNET8.md - 6-9 months, LOW RISK, .NET 8 only
  • MIGRATION-PROPOSAL-B-COMBINED-AVALONIA.md - 12-18 months, MEDIUM-HIGH RISK, implements full MIGRATION-PLAN-0.md with systematic GeckoFX/Graphite removal
  • MIGRATION-PROPOSAL-C-PRAGMATIC-HYBRID.md - 9-15 months, MEDIUM RISK, starts conservative with Avalonia pilot, 3 decision gates (RECOMMENDED)

Graphite & Legacy Removal: Risk #4 Approach #3 and Proposal B specifically address removing Graphite complexity you mentioned. Modern alternatives (HarfBuzz, platform text APIs) replace 15-year-old code.

MIGRATION-PLAN-0.md Integration: Extensively referenced throughout. Proposal B implements the patch-by-patch plan (P0-P5). Risk analyses reference specific patches (e.g., P5.1-P5.3 for XCore MVVM migration).

Main DOTNET_MIGRATION.md updated with links to all documents and comparison table.

Copilot AI changed the title Add comprehensive .NET 8 migration analysis with risk assessment for all 62 FieldWorks components Add comprehensive .NET 8 migration analysis with detailed risk assessments and alternative migration proposals Nov 4, 2025
Copilot finished work on behalf of johnml1135 November 4, 2025 20:59
@johnml1135 johnml1135 closed this Nov 12, 2025
@johnml1135 johnml1135 deleted the copilot/estimate-dotnet8-migration branch November 12, 2025 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants