I have cloned a github repo and am trying to run it in Visual Studio but cant seem to figure it out. How do you compile a github repo in visual studio?
-
What errors are you seeing? Most times it should just be a matter of cloning the repo, opening the solution in VS and pressing F5. You may also need to download the nuget packages associated with the solution as they are generally not included as part of the repo. – Nathan Fisher Jul 25 '14 at 01:45
-
@NathanFisher I can get my app to run in the online portion of VS. But im trying to make it run in Multi-Device Hybrid Theory and that's not working. – Ian Pennebaker Jul 25 '14 at 12:40
1 Answers
Github repo is nothing but normal files. So I think there should not be any difference between normal project run and github repo run. There are chances that github repo won't work if:
Repo not containing project files required to project in visual studio.(like Project.sln file)
Repo is made from newer version of visual studio and you are trying to run in older version and vise versa.
Web.config file is not supported or not according to your machine. I cannot say what can be the exact reason but still I am writing the whole process down so that you can refer it and can check if you are making any mistakes. My process is for Visual Studio 2015 and SQL server 2012.
- Goto Team Explorer -> Manage Connection option and click on clone option.
- Write down the git URL. Recommended that you copy it directly from github account. It is url of .git file for your repo.
- Choose local path from your PC. (Recommended that you do not copy path of C: drive)
- Start cloning. It will take some time as per the size of your repo.
- By default you will be on master branch of your repo. You can switch over from branch section and remotes/origin option. Just double click on that and you will be checked in that brach.
- Go to solution explorer. Code according to your branch will be there. Now you need to check you connection string. So go to web.config or file where ever you put your connection string. Change the path as per local machine or server configurations.
- It's done now. If all connection are good and build is successful then you should be able to run your project.
I hope your problem is solved with this information and able to find your mistake.