locked
Source Control - Git : The current solution has projects that are located outside the solution folder RRS feed

  • Question

  • User-1314494361 posted

    I have a web site project developed in Visual Studio 2010 where the solution file is Visual Studio 2010\Projects\Rascal\Rascal.sln and the website files and folders are under Visual Studio 2010\WebSites\Rascal\.  This is the way Visual Studio 2010 set it up.

    I work on the project now in Visual Studio 2019.  I cannot source control the project using Git. I get the error:  The current solution has projects that are located outside the solution folder.These projects will not be source controlled in Git repository.To add all the projects to a single Git repository please consolidate all projects under a single folder

    How do I deal with this?  I have tried moving Rascal.sln to the web site folder but this did not help.  I have also tried consolidating the files into the one directory a number of ways but still no luck.

    Any help would be appreciated.   

    Thanks...Alan

    Saturday, April 4, 2020 12:46 AM

All replies

  • User288213138 posted

    Hi alan52,

    This may be because some files may be located outside the solution folder. You can verify if there are no files outside the project/solution folder by checking the csproj file.

    If everything seems fine it might just be some corrupted file. Remove all git related files and then reopen solution and try adding it to source control.

    I have a web site project developed in Visual Studio 2010

    And there is no web site project in vs2019.

    Best regards,

    sam

    Tuesday, April 7, 2020 6:03 AM
  • User-1314494361 posted

    Hi Sam

    Thanks for your reply.
    There is no vsproj file, nor a vbproj file. The website is in visual basic.

    To the extent it adds value:

    The content of the Projects\Rascal\ folder is:
    .nuget folder
    .vs folder
    packages folder
    Performance1.psess
    Rascal.sln
    Rascal.v11.suo
    Rascal.v12.suo
    Rascal_.psess
    Rascal_1.psess
    Rascal_150917cspx
    Rascal_170925.vspx


    The content of Rascal.sln is:

    Microsoft Visual Studio Solution File, Format Version 12.00
    # Visual Studio 15
    VisualStudioVersion = 15.0.27130.2010
    MinimumVisualStudioVersion = 10.0.40219.1
    Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Rascal", "..\..\..\Visual Studio 2010\WebSites\Rascal\", "{D9E7E935-0035-4B6D-8F4E-5AD9C2B786EA}"
    ProjectSection(WebsiteProperties) = preProject
    TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.6"
    Debug.AspNetCompiler.VirtualPath = "/Rascal"
    Debug.AspNetCompiler.PhysicalPath = "..\..\..\Visual Studio 2010\WebSites\Rascal\"
    Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\Rascal\"
    Debug.AspNetCompiler.Updateable = "true"
    Debug.AspNetCompiler.ForceOverwrite = "true"
    Debug.AspNetCompiler.FixedNames = "false"
    Debug.AspNetCompiler.Debug = "True"
    Release.AspNetCompiler.VirtualPath = "/Rascal"
    Release.AspNetCompiler.PhysicalPath = "..\..\..\Visual Studio 2010\WebSites\Rascal\"
    Release.AspNetCompiler.TargetPath = "PrecompiledWeb\Rascal\"
    Release.AspNetCompiler.Updateable = "true"
    Release.AspNetCompiler.ForceOverwrite = "true"
    Release.AspNetCompiler.FixedNames = "false"
    Release.AspNetCompiler.Debug = "False"
    VWDPort = "51798"
    SlnRelativePath = "..\..\..\Visual Studio 2010\WebSites\Rascal\"
    EndProjectSection
    EndProject
    Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{2F1F0E2B-7516-4063-947A-E9557F4B1611}"
    ProjectSection(SolutionItems) = preProject
    .nuget\NuGet.Config = .nuget\NuGet.Config
    .nuget\NuGet.exe = .nuget\NuGet.exe
    .nuget\NuGet.targets = .nuget\NuGet.targets
    EndProjectSection
    EndProject
    Global
    GlobalSection(SolutionConfigurationPlatforms) = preSolution
    Debug|Any CPU = Debug|Any CPU
    EndGlobalSection
    GlobalSection(ProjectConfigurationPlatforms) = postSolution
    {D9E7E935-0035-4B6D-8F4E-5AD9C2B786EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    {D9E7E935-0035-4B6D-8F4E-5AD9C2B786EA}.Debug|Any CPU.Build.0 = Debug|Any CPU
    EndGlobalSection
    GlobalSection(SolutionProperties) = preSolution
    HideSolutionNode = FALSE
    EndGlobalSection
    GlobalSection(ExtensibilityGlobals) = postSolution
    SolutionGuid = {5AF9BB6E-3B96-44CA-9CD7-C7B2ADD7424C}
    EndGlobalSection
    GlobalSection(Performance) = preSolution
    HasPerformanceSessions = true
    EndGlobalSection
    GlobalSection(Performance) = preSolution
    HasPerformanceSessions = true
    EndGlobalSection
    EndGlobal

    If this helps then I would be pleased to hear from you again.

    Kind regards....Alan

    Tuesday, April 7, 2020 8:18 AM
  • User288213138 posted

    Hi alan52,

    .nuget folder
    .vs folder
    packages folder
    Performance1.psess
    Rascal.sln
    Rascal.v11.suo
    Rascal.v12.suo
    Rascal_.psess
    Rascal_1.psess
    Rascal_150917cspx
    Rascal_170925.vspx

    You can try to use git gui to source control the project.

    The use of git gui you can refer to this link: https://git-scm.com/docs/git-gui

    Best regards,

    Sam

    Thursday, April 9, 2020 2:21 AM