Skip to content

Phase 2: .NET Core Migration Infrastructure Setup#8

Open
devin-ai-integration[bot] wants to merge 1 commit into
masterfrom
devin/1768165410-phase2-netcore-infrastructure
Open

Phase 2: .NET Core Migration Infrastructure Setup#8
devin-ai-integration[bot] wants to merge 1 commit into
masterfrom
devin/1768165410-phase2-netcore-infrastructure

Conversation

@devin-ai-integration

Copy link
Copy Markdown

Summary

This PR sets up the parallel infrastructure for migrating RestSharp from legacy .NET Framework to .NET Standard 2.0/.NET Core. This is Phase 2 work that runs in parallel with Phase 1 (API inventory and test baseline creation) and does not modify any existing source files.

Key additions:

  • RestSharp.Core.csproj targeting .NET Standard 2.0 with updated dependencies (Newtonsoft.Json 13.0.3, System.Text.Json 8.0.5)
  • RestSharp.Core.Tests.csproj targeting .NET 8.0 with xUnit 2.9.2 (migrated from 1.9.0.1566)
  • RestSharp.Core.sln solution file with Debug/Release configurations
  • GitHub Actions CI/CD workflow for multi-platform builds (Ubuntu, Windows, macOS)
  • Migration scripts for file consolidation and conditional compilation removal
  • Comprehensive migration documentation in docs/MIGRATION_GUIDE.md

All 13 infrastructure validation tests pass locally. The build succeeds with zero errors.

Review & Testing Checklist for Human

  • Verify dependency versions are appropriate - Newtonsoft.Json upgraded from 4.5.1 to 13.0.3 is a major version jump. Review if any known breaking changes could affect RestSharp's serialization patterns.
  • Review CI/CD workflow - The GitHub Actions workflow in .github/workflows/build.yml is new and untested in CI. Verify it runs successfully after merge.
  • Validate migration scripts - The scripts in scripts/ have --dry-run options but haven't been tested against actual source files. Run ./scripts/consolidate-files.sh --dry-run --verbose to preview behavior.
  • Confirm no existing files were modified - This PR should only add new files. Verify the existing RestSharp codebase is untouched.

Recommended test plan:

  1. Wait for CI to complete and verify all matrix builds pass (6 combinations: 3 OS × 2 configurations)
  2. Clone the branch locally and run dotnet test RestSharp.Core.sln to verify tests pass
  3. Run migration scripts with --dry-run flag to preview their behavior

Notes

  • The RestSharp.Core project currently contains only a placeholder class (BuildValidation). Actual source migration will occur in Phase 3.
  • The remove-conditional-compilation.sh script marks platform-specific code with TODO comments rather than removing it, requiring manual cleanup during Phase 3.
  • System.Text.Json is included as an optional alternative serializer for future consideration.

Link to Devin run: https://app.devin.ai/sessions/473c6c4a5d174634aac4ca05aefd2562
Requested by: @bcmake

This commit sets up the parallel infrastructure for migrating RestSharp
from legacy .NET Framework to .NET Standard 2.0/.NET Core.

Infrastructure Setup:
- RestSharp.Core.csproj targeting .NET Standard 2.0
- RestSharp.Core.sln solution file with Debug/Release configurations
- RestSharp.Core.Tests.csproj with xUnit 2.9+ (migrated from 1.9)

Dependency Research:
- Newtonsoft.Json 13.0.3 (upgraded from 4.5.1/4.0.8)
- System.Text.Json 8.0.5 as alternative serializer
- xUnit 2.9.2 with Microsoft.NET.Test.Sdk 17.11.1
- FluentAssertions 6.12.1 and Moq 4.20.72 for testing

CI/CD Pipeline:
- GitHub Actions workflow for multi-platform builds (Ubuntu, Windows, macOS)
- Automated testing with code coverage
- NuGet package generation

Migration Scripts:
- consolidate-files.sh: Consolidates linked source files
- remove-conditional-compilation.sh: Removes platform-specific directives
- update-dependencies.sh: Checks and updates NuGet packages

Documentation:
- MIGRATION_GUIDE.md with comprehensive migration guidance
- Dependency changes, breaking changes, and recommended approaches

Test Infrastructure:
- InfrastructureValidationTests.cs: Validates test framework setup
- JsonSerializationCompatibilityTests.cs: Tests JSON serializer compatibility
- Sample test data in SampleData directory

All 13 tests pass. Build succeeds on .NET SDK 9.0.

Co-Authored-By: benc@cognition.ai <Benc@windsurf.com>
@devin-ai-integration

Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

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.

0 participants