empty website and git

前端 未结 3 1826
-上瘾入骨i
-上瘾入骨i 2020-12-21 08:15

hi as am a newbie to GIT with visual studio , I\'m working with an n-tier website with multiple projects and at first i make it as an empty website , so the visual studio

3条回答
  •  渐次进展
    2020-12-21 08:32

    Rather than try to move the website files to the solution folder, it appears to be much easier to save a copy of the sln file to the websites folder from within Visual Studio. Then delete the original sln file in the projects folder. Do not just move the sln files in file explorer. The sln file contains paths, and by saving as a new sln the paths are updated.

    The previous answer by @stephen seems like a great idea, but winds up creating duplicate folders in the Projects folder. Subsequently the sln file and the project files still wind up in different directories. @TimSmith-Aardwolf details correcting this, but it is a process.

    The easiest way to proceed I've found is to go to File > Save sln As... and select the website files folder.

    This places a new identically named sln file inside the same folder as the website files. You do not have to close Visual Studio, Solution Explorer now lists the newly saved sln. Right click the Solution and select Add to Source Control. I found this process here and it works great.

提交回复
热议问题