none
VS2015: "The selected file is not a valid solution file" RRS feed

  • Question

  • A solution worked fine for a few years.  It was working fine 10 days ago.  When I try to open the file the solution, the following error popped up:

    Could anyone offer a tip on how to salvage this solution?


    Hong

    Friday, November 11, 2016 1:24 AM

Answers

  • Hi Hong,

    I'm glad that you have found out the issue is caused by the broken .sln file. There are lots of reasons could cause .sln file broken, such as some third part program on your machine or some mishandling result the .sln file destroyed.

    I suggest you backup your solution if there has a long time you will not work on it in future.

    Best Regards,
    Weiwei


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, November 16, 2016 8:12 AM
    Moderator

All replies

  • Hi Hong,

    Please create a new solution and after build it, please close and reopen it with your current version of Visual Studio, whether it could be opened again?

    If the new solution could be opened, this issue should be related to your current solution itself. Please create a blank new solution in your Visual Studio 2015 and add the projects into the new solution by Add -> Existing Project.

    If the new solution could not be opened, I'm afraid that there has any issues on your Visual Studio 2015 itself. Please check whether you have installed any Updates and third part extensions for Visual Studio 2015 before this issue occurs. You could run your Visual Studio in safe mode to prevents all third-party VSPackages from loading when Visual Studio starts, thus ensuring stable execution.

    And if there doesn't have any update/extensions installed, I suggest you repair your Visual Studio 2015 to check whether there has any installation issue on your Visual Studio 2015.

    Best Regards,
    Weiwei


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, November 11, 2016 5:44 AM
    Moderator
  • Thank you for your prompt reply, Weiwei.

    I should have mentioned that VS 2015 can open many other solutions without any problem.  This is the only solution with this problem. 


    Hong

    Friday, November 11, 2016 12:52 PM
  • Hi Hong,

    If this is the only solution with this problem, do you have tried create a new solution and add the projects into the new solution by Add -> Existing Project? It could help us confirm whether there has any problem in your solution file and also could help use confirm which specific project causes this issue.

    Before do above steps, please backup your current solution. If the new solution is fine, you could compare the original solution file and the new solution file to find out what happened in the original solution.

    Best Regards,
    Weiwei


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, November 14, 2016 1:28 AM
    Moderator
  • Thank you for trying to help, Weiwei.  Yes, a newly created solution works.  I have not added back all the 10+ existing projects.  I added back only four: one Windows Phone app project and three library projects used by the app. 

    Hong

    Monday, November 14, 2016 2:01 AM
  • Hi Hong,

    After adding the four projects into the solution, is it working fine?

    And you could open the .sln file with Notepad, then you could compare whether there has any changes in your original solution file.

    Best Regards,
    Weiwei


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, November 15, 2016 7:02 AM
    Moderator
  • Hi Weiwei,

    I have just realized the old solution file is illegible.  I do not know how it got corrupted. 


    Hong

    Tuesday, November 15, 2016 2:57 PM
  • Hi Hong,

    I'm glad that you have found out the issue is caused by the broken .sln file. There are lots of reasons could cause .sln file broken, such as some third part program on your machine or some mishandling result the .sln file destroyed.

    I suggest you backup your solution if there has a long time you will not work on it in future.

    Best Regards,
    Weiwei


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, November 16, 2016 8:12 AM
    Moderator