I have a vs.net project, and after some refactoring, have modified the name of the project. How can I easily rename the underlying windows folder name to match this new pro
My particular configuration is VS2010 connecting to TFS2008. I tried some of the other solutions here, but had problems. I found the following worked for me:-
Now, you'll have the folder rename and the solution re-map all committed under one changeset.
Just right click on the folder in TFS, and select Rename. Once you commit the rename, TFS will make the changes on disk for you. As Kevin pointed out, you will want to make sure that everything is checked in, because TFS will remove the old folder and everything in it, and pull down the renamed folder with the current version of the files in it.
One final note: You can't rename a folder that you haven't mapped, or that you haven't done a "Get" from. I don't know why, but TFS will disable the Rename option in these cases.
At least that's what happened to me, if I remember correctly.
For Visual Studio 2019 and ASP.NET Core 2.2 I had to modify Scott Munro's answer slightly. Here's what worked for me:
Before you start: Check in all changes and make a backup of your solution.
I had to do step 1 first in order to get the project to load after fixing the file path in step 3.
You could just rename the project (.Xproj file and project folder) in TFS, delete the local folder structure and all of its contents, then do a get latest for the project. All of this depends the notion of your source repository is completely up to date and compilable.
Here are steps that worked for me in Visual Studio 2008 with TFS:
OR: After step 2, you can open the solution's .sln file in a text editor, and manually update the project folder names. If you do this, you might need to manually check-out the .sln file to be sure your changes will be checked in (<- important!).
No
' when prompted to get projects that were newly added to the solution from source control. You will get a warning that one of the projects in the solution could not be loaded.Note that it will be grayed out and marked as 'Unavailable'.
...
' button.
Note also that this property is only editable in Visual Studio 2010. In newer versions of Visual Studio, you will need to manually edit the project paths within the solution file.
Note: Other suggested solutions that involve removing and then re-adding the project to the solution will break project references.
If you perform these steps then you might also consider renaming the following to suit.
Also, consider modifying the values of the following assembly attributes.
AssemblyProductAttribute
AssemblyDescriptionAttribute
AssemblyTitleAttribute