empty website and git

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 make a directory to the solution in Projects folders for VS2012 at documents and The BLL and DAL and the website pages itself at websites directory for visual studio main directory .
so when i trying to add the solution the source control this message shown up :

the current solution has projects that are located outside the solution folder.
there projects will not be source controlled in the git repository.
to add all the projects to a single Git repository please consolidate all projects under a single folder

i tried to copy the website into my solution folder but nothing happened of course 😀
how can i make this work ?

thanks

  • How do I git stash with Visual Studio Tools for Git v0.8.5.1
  • GITHUB is Pushing the changes with Old Credentials not with New Credentials
  • How to install aquila library in visual studio
  • Jenkins MSTestRunner plugin is unable to launch mstest.exe
  • SonarQube warning on MSBuild version
  • Assembly binding error when building Office add-in: “FindRibbons” task failed unexpectedly
  • TF400324: Team Foundation services are not available from server <Server/CollectionName> in Visual Studio 2012
  • Configure vsdiffmerge for multiple files at once
  • 2 Solutions collect form web for “empty website and git”

    You can delete the website from the solution in visual studio, and then ‘add existing project’ to solution. Otherwise create a new empty website and enter the solution directory as the location for the website instead of the default location.

    I had the same problem with Visual Studio 2015 and the website templates for .NET Framework 4 (Looks like this has been sorted for templates targeting 4.5).

    This is how I got the files from the template into the project

    1. Click File -> New -> Web site
    2. Select Templates -> Visual C# -> ASP.NET Web Forms Site
    3. Leave Web location as File System and choose a folder. I used C:\Users\tim\Documents\Visual Studio 2015\Projects\WebSite4
    4. Click OK

    You’ll now see in Windows Explorer there are two folders WebSite4 and WebSite4 (2). The second folder has the sln file and packages folder.

    1. Create a folder in WebSite4 (2) called Website
    2. Copy the contents of Website4 into WebSite4 (2)\Website

    Return to Visual Studio

    1. In Solution Explorer, right click WebSite4 and then click Remove. Click OK to confirm.
    2. Right click Solution, click Add -> Existing Website.
    3. Select the folder WebSite4 (2)\Website and click Open.

    Bonus – rename the solution
    10. Right click Solution ‘WebSite4 (2)’ and click Rename. Remove the (2)

    Bonus – rename the folder

    1. Rename the folder
    2. Close the solution
    3. Rename the folder in Windows Explorer
    4. Open -> Project/Solution

    Once that was all done I was able to publish the project to a remote git repository through Team Explorer.

    Git Baby is a git and github fan, let's start git clone.