Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ private void RenameProject(Project project, DTE2 dte)
var newName = dialog.NewProjectName;
var projectFilePath = project.FullName;

// Remove project from solution before file operations
dte.Solution.Remove(project);

// Update RootNamespace and AssemblyName in .csproj
ProjectFileService.UpdateProjectFile(projectFilePath, currentName, newName);

Expand All @@ -92,9 +95,11 @@ private void RenameProject(Project project, DTE2 dte)
// Rename parent directory if it matches the old project name
projectFilePath = ProjectFileService.RenameParentDirectoryIfMatches(projectFilePath, currentName, newName);

// Re-add project to solution with new path
dte.Solution.AddFromFile(projectFilePath);

// TODO: Implement remaining rename operations
// See open issues for requirements:
// - #22: Remove and re-add project to solution
// - #23: Update project references
// - #9: Update using statements across solution
// - #11: Solution folder support
Expand Down