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
I had the same problem. I solved with move the references and in less than 15 minutes, without change the references.
For me the solution was simple:
Examples:
In solution file (.sln)
Original: Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PATH1.UI", "ScannerPDF\PATH1.UI\PATH1.UI.csproj", "{A26438AD-E428-4AE4-8AB8-A5D6933E2D7B}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PATH1.DataService", "ScannerPDF\PATH1.DataService\PATH1.DataService.csproj", "{ED5A561B-3674-4613-ADE5-B13661146E2E}"
New: Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PATH1.MX.UI", "PATH1.MX.UI\PATH1.UI.csproj", "{A26438AD-E428-4AE4-8AB8-A5D6933E2D7B}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PATH1.DataService", "PATH1.DataService\PATH1.DataService.csproj", "{ED5A561B-3674-4613-ADE5-B13661146E2E}"
In project file:
Original:
New:
Original reference: ....\lib\RCWF\2018.1.220.40\TelerikCommon.dll
New reference: ..\lib\RCWF\2018.1.220.40\TelerikCommon.dll
Group related projects together using solution folders
See http://msdn.microsoft.com/en-us/library/vstudio/c6c756s6(v=vs.100).aspx
I tried the suggestion to remove and re-add the project, but then fixing up dependencies can be a pain.
I use this approach:
In VS 2015
MVC
, you may need to add the reference in the reference manager.I wanted the changes in Git to be shown as moves/renames instead of delete & adds. So I did a combo of the above and this post.
mkdir subdirectory
git mv -k ./* ./subdirectory
# check to make sure everything moved (see below)
git commit
And adjust the paths of the projects and of the assemblies from the nuget Pkg's in the sln file via a text editor.