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)?
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.
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.
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.
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
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.
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.
What I've done that solved my issue was simply right click on the project name then select undo changes
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
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
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.
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.
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
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.
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.
© 2022 - 2024 — McMap. All rights reserved.