VS : How to solve error - The project file could not be loaded. Could not find a part of the path

I recently rearranged the content of my working folder which is used to store all my coding-related projects. But after doing that I had a problem loading the solution of my WinForm project in Visual Studio as I received an error telling me about a problem with a project file.

The exact error message in the Output window was:

error  : The project file could not be loaded. Could not find a part of the path...

Another way you can encounter this error is if you renamed your project folder and sometimes you can get this error without moving or renaming anything at all. In this article, you will be shown how to solve this problem for all those cases.

For those who receive this error but did not move projects around

Try deleting .suo files in your solution folder. Solution User Option file is a binary file which contains various user information and settings such as location of the breakpoints.

If that didn't help try also to delete .user file.

If you have trouble finding .suo file

In Visual Studio, the .suo file is located inside a hidden .vs folder in solution folder. Since both .vs folder and .suo file have hidden attribute applied to them, you have to reveal them using using File Explorer by changing folder options to "show hidden files, folders and drives".
How to get to this option in File Explorer depends on the version of Windows:

  • In Windows 7, option is located under Organize > Folder and search options.
  • in Windows 8, it is located under View tab > Options > Change folder and search options.
  • in Windows 10, it is the same as in Windows 8.

For those who have this error due to moving projects around or renaming the project

The problem lies with the nonexistent path of one or more projects that are stored in the solution file.

You can solve this problem in two ways:

Using Text Editor

One way to fix this error is to correct the path of the problematic projects yourself by directly editing the .sln file.

For those who feel uncomfortable editing the solution file, there is another way. You can fix the path of the project directly from Visual Studio and this procedure is shown next.

Using Visual Studio

Just follow these steps:

  • Load the solution into VS. You might get Error Popup Window with the message shown below. Ignore the warning and click OK.

    Visual Studio Error Window with message that one or more projects were not loaded.
    Error window with a message "One or more projects in the solution were not loaded correctly. Please see the Output Window for Details."
  • In the Solution Explorer you should find at least one project that was not loaded. Select that project. It will have (unavailable) text next to the name as shown below:
    Not loaded project in Solution Explorer
    Solution Explorer with unavailable project

    In Properties Window you will find unloaded project properties. There will be a single property named File path which stores the path of the project. We need to change that so click on the path. Browse button ... will appear on the right as shown in the following image. Click on it.

    Properties Window of the unavailable project showing the project's path.
    Properties Window of the unavailable project showing the project's path.
    Note:Sometimes, the path in File path property is grayed out and you are unable to get to the Browse button. In this case try deleting .suo files. Don't worry, these files gets recreated when you rebuild the solution / project.
  • File Dialog box will open. Locate project file (.csproj) and click Open.
  • In the Solution Explorer, the project will still have (unavailable) message besides it. We still need to carry out one more step. Right-click on the project to open context menu. Select Reload Project as shown below:

    Reloading the unloaded project in the solution explorer.
    Reloading the unloaded project in the solution explorer.
  • Build solution. If you get an error telling you that the referenced project does not exist, we need to update references. Save solution and Close it, then Open project again.

Now you should be able to build a solution without getting errors (at least not those relating to paths of a project file).

92 Comments

Click HERE to add your Comment
  1. Manal Adham
    May 22, 2013
  2. Razwan
    July 3, 2013
    • admin
      July 3, 2013
      • Pooran Yadav
        September 9, 2016
        • admin
          September 9, 2016
  3. Jordan Villalobos
    July 29, 2013
    • bharat
      April 14, 2016
  4. Joseph
    September 5, 2013
  5. devi
    September 7, 2013
  6. admin
    September 7, 2013
    • sherlockspreadsheets
      December 5, 2017
  7. j
    October 3, 2013
  8. Abdoulaye
    December 23, 2013
  9. Osas
    January 22, 2014
  10. Fabio
    March 18, 2014
    • Jo
      September 2, 2014
      • Dennis van der Pool
        September 9, 2015
  11. Timple Nithiya
    May 13, 2014
  12. Sean Harrison
    August 7, 2014
  13. vahid
    August 29, 2014
  14. Russell
    September 25, 2014
  15. Steve
    September 26, 2014
  16. Great
    October 2, 2014
  17. Hrishikesh
    December 23, 2014
  18. Noam
    January 7, 2015
  19. Dilli Rajan
    January 12, 2015
  20. Balazs
    January 23, 2015
  21. Kenny
    March 24, 2015
  22. Patrick
    May 12, 2015
  23. RiJo
    May 18, 2015
  24. Lehlohonolo Letaoana
    June 28, 2015
  25. Albert
    January 24, 2016
  26. Andre
    February 17, 2016
  27. Harpal
    February 18, 2016
    • admin
      February 18, 2016
      • Harpal
        February 19, 2016
  28. genevieve
    February 24, 2016
    • admin
      February 24, 2016
  29. MJH
    March 23, 2016
  30. LLS
    June 13, 2016
  31. Swathi
    June 15, 2016
    • Black Cock
      January 27, 2021
  32. Anatoliy
    July 4, 2016
  33. DW
    August 11, 2016
  34. Fagrie
    August 19, 2016
  35. Michael Strebl
    August 31, 2016
  36. Maurizio
    September 13, 2016
  37. Alex
    September 19, 2016
  38. Gerry
    September 30, 2016
  39. Trent
    November 17, 2016
    • admin
      November 17, 2016
  40. DAwilly
    December 21, 2016
  41. sanjay
    January 5, 2017
  42. Mahdi
    March 3, 2017
  43. Kolade Ige
    March 4, 2017
  44. TheOne
    March 6, 2017
  45. mike
    March 20, 2017
    • admin
      March 20, 2017
  46. Erin
    May 5, 2017
  47. marmar
    May 25, 2017
  48. Milos Petrovic
    May 25, 2017
  49. kenhero
    June 16, 2017
  50. Christ
    August 1, 2017
  51. Semira
    August 1, 2017
  52. Asia
    October 7, 2017
  53. Kukuruyuk
    October 12, 2017
  54. Supriya
    October 25, 2017
  55. Megan
    October 30, 2017
  56. Bryon
    November 13, 2017
  57. O Nikhilesh
    January 4, 2018
  58. Oren
    January 15, 2018
  59. Mahmoud
    January 26, 2018
    • admin
      January 27, 2018
  60. nishu
    February 5, 2018
  61. Ritu Goel
    February 25, 2018
  62. paridhi
    March 4, 2018
    • admin
      March 7, 2018
  63. Vijay
    March 29, 2018
  64. Eben
    July 6, 2018
  65. Corey
    July 13, 2018
  66. Murali
    July 17, 2018
  67. Carlos
    August 16, 2018
  68. ihsan
    January 6, 2019
  69. Pratibha Sampath
    May 21, 2020
  70. NS
    September 10, 2020
  71. Biswajit
    May 25, 2021
    • admin
      May 25, 2021
  72. Marcelo
    September 13, 2021
  73. Noga
    September 30, 2021
  74. Anurag Deshmukh
    October 27, 2021
  75. alperen
    September 6, 2023

Write a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.