Visual Studio Solution shows (0 projects)
Asked Answered
B

13

11

How do I get my project to work when it says in the solution explorer Solution 'solution name' (0 projects) and below that it says 'project name' (unavailable)?

Burgher answered 22/3, 2017 at 19:41 Comment(1)
The answers to this can be classified roughly 1) add the project back to the solution (maybe remove it first), 2) reload the project, 3) check source-control for recent changes to the solution and project files in case recent changes corrupted them, 4) remove derived files like SUO in case they have been corrupted, 5) check for project-specific errors. The latter option is the one to take when reloading clearly doesn't work. If a project is consistently unable to load, check Visual Studio's Output tab to see whether it reports errors. Then look up or ask how to fix the errors reported there.Gamelan
B
6

All I had to do to get this working is I had to right click the project and click reload project. Somehow my project got unloaded. When your circumstances look like this, it is possible that this happened.

Burgher answered 22/3, 2017 at 19:41 Comment(0)
L
9

try this:

  • right click on the solution name
  • select 'Add'
  • select 'Existing Project'
  • in browser window go to your project folder and select 'YourProjectName.csproj' file (.csproj file of project)
  • and the project will be added! so Done!

Best Regard.

Leach answered 21/11, 2019 at 17:22 Comment(0)
B
6

All I had to do to get this working is I had to right click the project and click reload project. Somehow my project got unloaded. When your circumstances look like this, it is possible that this happened.

Burgher answered 22/3, 2017 at 19:41 Comment(0)
N
3

its all about PATH Right click on This PC -> Properties -> Advanced System Settings -> Advanced -> Environment Variables -> System Variables

Check you install path , most probably it will be as follow Variable value >> C:\Program Files\dotnet and remove "C:\Program Files (x86)\dotnet" and all is good

Nofretete answered 16/1, 2023 at 7:56 Comment(1)
No need to remove the (x86) one, just put it below the normal oneDeeplaid
H
1

for me the Accepted Answer did not fix it, I went back through my commit history and got the last ver. that was working,

That fixed it. Hope this helps others that have this problem.

Hewet answered 28/5, 2018 at 7:53 Comment(1)
Not saying it will, It was one possible solution.Burgher
A
1

I thought it would be worth mentioning my case, there wasn't an option to reload based on the current correct answer probably because you somewhat had a project and also considering the age of this forum. So apparently visual studio didn't download the .net core sdk, which is quiet odd and caused me to have 0 projects, so if you add an existing project you'll get an error, so what i had to do was just download the files from here: https://dotnet.microsoft.com/download/dotnet But of course depending on which project you make, you might require different files the error you get will give you information on what files you need.

Anuska answered 7/8, 2021 at 9:21 Comment(0)
L
0

What I've done that solved my issue was simply right click on the project name then select undo changes

Lecce answered 3/10, 2018 at 10:53 Comment(0)
G
0

In my case there was a system variable missed, adding that worked for me.

Right click on This PC -> Properties -> Advanced System Settings -> Advanced -> Environment Variables -> System Variables

Check you install path , most probably it will be as follow Variable value >> C:\Program Files\dotnet
Variable name >> path

Geophilous answered 16/10, 2021 at 15:34 Comment(0)
C
0

go to

C:\Program Files (x86)\dotnet and check if sdk is installed if is not installed, copy sdk file from C:\Program Files\dotnet and Paste it to directory C:\Program Files (x86)\dotnet

Contaminate answered 10/4, 2023 at 11:20 Comment(0)
E
0

The solution was looking for the project under C:\Users<username>\source\repos and the project was saved in a different folder from the solution.

I solved the problem by right clicking on the solution in the "Solution Explorer" and then selecting "Add -> Existing Project..." and browsed to where my .csproj file was saved.

Eustace answered 10/8, 2023 at 3:45 Comment(1)
Thanks for the correction. I choose add existing project from the solution explorer to my solutionEustace
M
0

17- May - 2024 I had the same issue, none of the above solutions fixed the problem, so I tried repairing Visual Studio from the installer , then a restart for the PC was required. reopen a project on Visual Studio then right click on the solution , add existing project , Then right click on the project , properties , Single Start up project menu , then select your project name , then click ok.

Munition answered 17/5 at 11:29 Comment(0)
S
0

Basically, the solution (in my case) was the following:

Windows => Edit Environmental Variables => System Variables => Path

And there, for some reason, I had two path to donet. C:\Program Files\dotnet and C:\Porgram Files (x86)\dotnet. I deleted the later and now everything works!

Now close the Visual studio and open the project, it will now load the project.

WHAT TO MODFY: https://imgur.com/YnsXDKY

Sparling answered 25/5 at 20:41 Comment(0)
I
-1

I had right click the solution and selected "go back git" option and then it canceled the last changes and the project reloaded suddenly. So it seems ok for now.

Inappreciable answered 27/7, 2018 at 12:17 Comment(2)
Welcome to stackoverflow. Please consider your grammer and spelling before posting an answer.Burgher
Thanks for your notice, sorry for this, I tried to correct. RegardsInappreciable
U
-1

In my case path is present over thier and i just move it upward Right click on This PC -> Properties -> Advanced System Settings -> Advanced -> Environment Variables -> System Variables

in my case their are two path available , one is of program file and another one is program file(86) and i just move program file path up.

Uraninite answered 16/1, 2023 at 4:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.