Skip to content

feat(references): update project references after rename#29

Merged
CalvinAllen merged 1 commit into
mainfrom
feat/references/update-after-rename
Dec 20, 2025
Merged

feat(references): update project references after rename#29
CalvinAllen merged 1 commit into
mainfrom
feat/references/update-after-rename

Conversation

@CalvinAllen

Copy link
Copy Markdown
Contributor

Summary

  • Adds ProjectReferenceService to manage project references during rename operations
  • Before removing the project, collects all projects that have a <ProjectReference> to it
  • After rename, updates those references with the new project path
  • Handles both SDK-style and legacy (MSBuild namespace) project files

How it works

  1. Before removal: Scans all projects in solution to find those referencing the target
  2. After file/directory rename: Updates <ProjectReference Include="..."> paths in those projects
  3. Calculates correct relative paths from each referencing project to the renamed project

Test plan

  • Rename a project that is referenced by another project
  • Verify the referencing project's .csproj is updated with new path
  • Verify solution still builds after rename
  • Test with projects in different directory depths

Closes #23

- Add ProjectReferenceService to manage project references during rename
- Find projects that reference the target before removal
- Update ProjectReference paths in referencing projects after rename
- Handles both SDK-style and legacy project files

Closes #23
@CalvinAllen CalvinAllen merged commit 22efe75 into main Dec 20, 2025
1 check passed
@CalvinAllen CalvinAllen deleted the feat/references/update-after-rename branch December 20, 2025 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

feat(references): update project references after rename

1 participant