change solution file to a different folder

后端 未结 9 1160
遥遥无期
遥遥无期 2021-02-03 18:03

How do I change the folder of my existing solution file (sln)?

It\'s right now inside one of my project\'s folder; if I cut the solution file and paste it in the root fo

9条回答
  •  渐次进展
    2021-02-03 18:37

    I just had to do this with some legacy projects I inherited so thought it might be worth documenting...

    After upgrading from VS 2005 solution, I noticed that the solution file was at the same level as the project files. Our standard is to have the solution file one level above.

    Undesired location of solution file.

    Opening the solution file in 'Notepad' I see the following:

    Unchanged Solution file opened in notpad.

    Add required relative path to each of the project path and save in correct location:

    In my case to bring up one level 'BloombergPriceRequestService\'

    SO project line(s) will look like this:

    Microsoft Visual Studio Solution File, Format Version 11.00
    # Visual Studio 2010
    Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BloombergPaydownService", "BloombergPaydownService\BloombergPaydownService.csproj", "{17DDDD3E-CD39-48B4-BE3F-71E550FCBBFC}"
    EndProject
    Global
    

    Don't forget to delete your old solution file! I have moved the solution file up one level

提交回复
热议问题