Visual Studio move project to a different folder

前端 未结 15 2591
野的像风
野的像风 2020-11-30 18:41

How do I move a project to a different folder in Visual Studio? I am used to this structure in my projects.

-- app
---- Project.Something
---- Project.Someth         


        
相关标签:
15条回答
  • 2020-11-30 19:26

    It's easy in VS2012; just use the change mapping feature:

    1. Create the folder where you want the solution to be moved to.
    2. Check-in all your project files (if you want to keep you changes), or rollback any checked out files.
    3. Close the solution.
    4. Open the Source Control Explorer.
    5. Right-click the solution, and select "Advanced -> Remove Mapping..."
    6. Change the "Local Folder" value to the one you created in step #1.
    7. Select "Change".
    8. Open the solution by double-clicking it in the source control explorer.
    0 讨论(0)
  • 2020-11-30 19:29
    1. Copy the project folder to new destination
    2. Remove your project from solution (Right-click the project in "Solution Explorer" and choose "Remove")
    3. Then add existing project to solution (Right-click the project in "Solution Explorer" and choose "Add" then "Existing project")
    4. Change path to "packages" folder in "YourProjectName.csproj" file (Open in notepad and change paths for linked packages)
    0 讨论(0)
  • 2020-11-30 19:31

    This worked for me vb2019. I copied my source project folder. I then pasted the project, and renamed the the folder to whatever. In order to break the ties back to the source project folder, I temporarily renamed the source folder. I opened my destination project. The paths to the forms and modules were re-discovered in the local folder. I went through all my forms and modules to make sure they were working. I ran the project. I closed the project. I renamed the source project folder back to is't original name. I can open both projects at the same time without errors.

    0 讨论(0)
提交回复
热议问题