"The selected file is not a valid solution file" error when trying to open source safe database
Asked Answered
Q

8

11

I recently re-built my development machine which now uses windows 7. On this new machine, VS 2010 can no longer open sln files directly from SS 2005. These are valid 2010 solutions (orginally created witih VS 2010) that worked fine until I re-built my machine. My co-workers have the same setup and do not have this problem.

The message I get is "The selected file is not a valid solution file".

I've re-built many times and used many installs of VS and never had a problem opening sln's from SS using VS 05, 08 or 10. I've just never seen this before. My co-workers have not had this problem either

I have re-installed SS 2005 as well as the latest SS update but nothing works.

VS 2010 can open solutions from the file system just fine, so it must be a SS thing.

Any ideas?

Edit for contents of Solution file:

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyProject", "MyProjectX\MyProject.csproj", "{8E519F6C-A405-43AB-ADA0-F4829ECBEFE0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyProject_BL", "MyProject_BLMyProject_BL.csproj", "{595FFFB2-5CC3-40BB-9059-32ACFAA9DEFA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LinqKit", "LINQKit\LinqKit.csproj", "{AEC98F52-83F5-488D-99EF-8AFFE7C9F6E6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyProject_DL", "MyProject_DL\MyProject_DL.csproj", "{55506B29-70A8-4556-ADF9-2553B0F18379}"
EndProject
Global
    GlobalSection(SourceCodeControl) = preSolution
        SccNumberOfProjects = 5
        SccLocalPath0 = .
        SccProjectUniqueName1 = MyProject\\MyProject.csproj
        SccProjectName1 = \u0022$/MyProject.root/MyProject/MyProject\u0022,\u0020
        SccLocalPath1 = MyProject
        SccProjectUniqueName2 = MyProject_BL\\MyProject_BL.csproj
        SccProjectName2 = \u0022$/MyProject.root/MyProject/MyProject_BL\u0022,\u0020
        SccLocalPath2 = MyProject_BL
        SccProjectUniqueName3 = LINQKit\\LinqKit.csproj
        SccProjectName3 = \u0022$/MyProject.root/MyProject/LINQKit\u0022,\u0020
        SccLocalPath3 = LINQKit
        SccProjectUniqueName4 = MyProject_DL\\MyProject_DL.csproj
        SccProjectName4 = \u0022$/MyProject.root/MyProject/MyProject_DL\u0022,\u0020JNAAAAAA
        SccLocalPath4 = MyProject_DL
    EndGlobalSection
    GlobalSection(SolutionConfigurationPlatforms) = preSolution
        Debug|Any CPU = Debug|Any CPU
        Release|Any CPU = Release|Any CPU
    EndGlobalSection
    GlobalSection(ProjectConfigurationPlatforms) = postSolution
        {8E519F6C-A405-43AB-ADA0-F4829ECBEFE0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {8E519F6C-A405-43AB-ADA0-F4829ECBEFE0}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {8E519F6C-A405-43AB-ADA0-F4829ECBEFE0}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {8E519F6C-A405-43AB-ADA0-F4829ECBEFE0}.Release|Any CPU.Build.0 = Release|Any CPU
        {595FFFB2-5CC3-40BB-9059-32ACFAA9DEFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {595FFFB2-5CC3-40BB-9059-32ACFAA9DEFA}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {595FFFB2-5CC3-40BB-9059-32ACFAA9DEFA}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {595FFFB2-5CC3-40BB-9059-32ACFAA9DEFA}.Release|Any CPU.Build.0 = Release|Any CPU
        {AEC98F52-83F5-488D-99EF-8AFFE7C9F6E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {AEC98F52-83F5-488D-99EF-8AFFE7C9F6E6}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {AEC98F52-83F5-488D-99EF-8AFFE7C9F6E6}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {AEC98F52-83F5-488D-99EF-8AFFE7C9F6E6}.Release|Any CPU.Build.0 = Release|Any CPU
        {55506B29-70A8-4556-ADF9-2553B0F18379}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {55506B29-70A8-4556-ADF9-2553B0F18379}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {55506B29-70A8-4556-ADF9-2553B0F18379}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {55506B29-70A8-4556-ADF9-2553B0F18379}.Release|Any CPU.Build.0 = Release|Any CPU
    EndGlobalSection
    GlobalSection(SolutionProperties) = preSolution
        HideSolutionNode = FALSE
    EndGlobalSection
EndGlobal

Actions taken:

Step 1: File -> Open Project/Solution

enter image description here

Step 2: Select SourceSafe on left menu. You can now see ss_IssueTrak database stored in sourcesafe enter image description here

Step 3: Navigate to Solution IssueTrakX.sln enter image description here

Step 4: Click Open or double click IssueTrakX.sln and receive this error enter image description here

Quartering answered 14/2, 2011 at 17:8 Comment(10)
Can you check the line endings of the checked-out .sln file? VS is (or used to be) sensitive that the line endings in solutions and projects are 0d 0a not just 0a. I can't imagine why that would have changed, but that's the usual cause when I've seen that error in the past.Physician
It sounds like the problem is that you're executing/double clicking the .sln from VSS Explorer? "can no longer open sln files directly from SS 2005"Sorrells
@Rup: I'm not sure what you want to see with the file... if i open the .sln file in notepad, I don't see either of what you say should be there (0d 0a). I will post contents in my original question in a minute.Quartering
@p.campbell: The problem is that I cannot open from sourcesafe. I'm not quite sure if you're saying that it's throwing an error because I am double clicking? It doesn't matter if I double click or select Open, it does the same thing.Quartering
@Steph: right, I just wanted to understand clearly: the error is that your action is from VSS Explorer, rather than within Visual Studio or Windows Explorer. Is that right?Sorrells
@p.cambell :I have Visual Sourcesafe integrated with visual studio. What I am doing is, in Visual Studio, going to file -> open -> project/solution clicking sourcesafe on the left side, exploring my sourcesafe database, and selecting the solution file of the solution that i'm trying to openQuartering
You'd see those in a hex editor - 0d0a = CRLF, Windows line endings, and 0A=LF only, Unix line endings. Notepad only supports CRLF so if you see the file with line breaks in notepad then that's OK; if you see it with no line breaks then it's got the wrong line endings. If you open it with write or with VS in file mode then it'll show the line breaks.Physician
@Physician : I understand. There are line breaks in the file so I guess that is not the problem.Quartering
@Steph: can you post a screenshot to illustrate? It sounds as if the problem occurs in the Open File dialog of Visual Studio.Sorrells
@Sorrells I have uploaded screenshots of my actions.Quartering
M
2

you have to change permission

right click on parentfolder=>properties => security => (edit) button => (add) button => (advanced) button => (find now) button=> and now select : Everyone => ok => ok => Now you have to allow it full control=> Full control = Allow
=> ok

now let it to apply for all of subfolders and files

FINISHED

Microphysics answered 17/8, 2018 at 6:18 Comment(2)
This worked for me, but I applied Full control "Users."Alberik
This worked for me after I couldn't load any solutions after having to redownload all my OneDrive foldersGibbeon
W
1

I've had a similar error message after installing Windows 7. Turns out that some features of Visual Studio were not yet installed. It might have been a service pack or EF4. Once that was installed, I was able to open the solution file. Then, I was also getting "The project type is not supported by this installation" until I installed some other updates, like for MVC3.

I presume that the solution file had information that the un-patched Visual Studio did not recognize.

Warner answered 19/11, 2011 at 22:12 Comment(0)
V
1

In my case, the message "The selected file is not a valid solution file" occurred when there were file names in my solutions that were too long for the path where i wanted to download the solution. Putting the solution folder directly under the C:\ drive or a folder short to the C-drive solved my problem.

Vas answered 23/8, 2013 at 11:46 Comment(0)
M
1

For me this solution worked perfect:

Create new project in visual studio(new project name should be same as main projct name) and delete any default created project in new solution. now go to new project location and copy .sln file. go to main project location and delete .sln file and paste copied .sln file and open, than rebiuld solution again.

Note: if faced any erorr about project manifest you can edit .csproj(by notepad) and delete any tag related to manifet and save. again reload solution.

For me this worked.

Middelburg answered 15/9, 2020 at 8:40 Comment(0)
D
0

The main problem of .sln file. just edit it with your default .sln code. like this one enter image description here

Declaim answered 9/1, 2019 at 5:29 Comment(1)
How is this supposed to address the stated problem that VS doesn't open that file type anymore?Corked
C
0

I went into the containing folder, I opened the .csproj file in visual studio which caused the solution to reload and I no longer had the error.

Collotype answered 23/11, 2020 at 12:43 Comment(0)
A
0

Have a backup for existing project and delete it and re-download source code from version control. this steps worked for me

Africanize answered 19/1, 2022 at 12:35 Comment(0)
W
0

In Visual Studio File>Project from Existing Code, then navigate to the Root folder containing the .sln and add all of it's contents to your new project. Everything should load in your new solution.

Walhalla answered 19/12, 2023 at 19:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.