Skip to content

Fix solution and project references for cross-platform builds#2

Open
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1773784586-fix-project-setup
Open

Fix solution and project references for cross-platform builds#2
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1773784586-fix-project-setup

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

Summary

The solution could not build on Linux (and likely macOS) due to three independent issues:

  1. Microservices.sln used Windows backslash pathsdotnet on Linux silently failed to locate any projects, causing dotnet build on the .sln to report success while building nothing.

  2. Shared project references were wrong — All 5 API .csproj files referenced ..\..\Shared\... but from Services/X/X.API/, two levels up is Services/, not src/. The correct path is ../../../Shared/.... This caused Shared.Contracts and Shared.Infrastructure to be silently missing (compile errors in Notification.API which depends on OrderPlacedEvent from Shared.Contracts).

  3. Missing ProjectConfigurationPlatforms in .sln — Without this section, dotnet build Microservices.sln discovers zero projects to build. Added Debug/Release mappings for all 18 projects.

  4. global.json updated to allow the .NET 10 preview SDK (allowPrerelease: true).

Review & Testing Checklist for Human

  • global.json pins to a specific RC version (10.0.100-rc.2.25502.107) — this will likely need updating when .NET 10 GA ships. Consider whether "version": "10.0.100" with just "allowPrerelease": true added would be more future-proof.
  • Verify the solution still builds on Windows — forward slashes in .sln and .csproj should work, but worth confirming since the originals used backslashes.
  • Spot-check ProjectConfigurationPlatforms GUIDs — these were hand-written to match the project GUIDs already in the .sln. Verify no project was missed or duplicated.
  • Run dotnet build src/Microservices.sln and confirm all 18 projects compile with 0 errors.

Notes

  • No test projects exist in the repo, so dotnet test completes with no tests to run.
  • The .sln forward-slash convention is supported by MSBuild on all platforms; this is not a Linux-only workaround.

Link to Devin session: https://partner-workshops.devinenterprise.com/sessions/c962c62bbe62463e8808eb5b3426ba93

- Convert backslash paths to forward slashes in Microservices.sln
- Fix Shared project references in all API .csproj files (../../ -> ../../../)
- Add missing ProjectConfigurationPlatforms section to .sln
- Update global.json to allow prerelease SDK versions
@devin-ai-integration
Copy link
Copy Markdown
Contributor 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