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)?

0

11 Answers 11

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.

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.

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

1
  • 1
    No need to remove the (x86) one, just put it below the normal one
    – Gjaa
    Jan 28, 2023 at 21:51
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.

1
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.

0

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

0
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

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

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.

1
  • Thanks for the correction. I choose add existing project from the solution explorer to my solution Aug 14, 2023 at 9:34
-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.

2
  • Welcome to stackoverflow. Please consider your grammer and spelling before posting an answer. Jul 30, 2018 at 12:42
  • Thanks for your notice, sorry for this, I tried to correct. Regards Oct 9, 2018 at 14:38
-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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.