fernandoescolar / vscode-solution-explorer

This is a Visual Studio Code extension that provides a (.sln) Visual Studio Solution explorer panel..
MIT License
348 stars 73 forks source link

Doesn't open any solutions #255

Closed cosmoKenney closed 1 year ago

cosmoKenney commented 1 year ago

Describe the bug If I open code, then ctrl+shift+p, then Open Solution, nothing happens. The "SOLUTION" dropdown in "EXPLORER" (i changed the setting) just shows the two buttons "Open solution" and "Create New Solution".

To Reproduce Steps to reproduce the behavior:

  1. open code
  2. open a solution
  3. nothing happens

Also:

  1. open code
  2. open a folder
  3. in the "EXPLORER" under the "SOLUTION" section, expand a project
  4. see spinning icon indefinitely.

Expected behavior The solution and projects in it should be revealed under the "SOLUTION" drop down within explorer.

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

Additional context

fernandoescolar commented 1 year ago

Here are two issues:

cosmoKenney commented 1 year ago

Here are two issues:

  • About the first one: I have seen that a solution file is not opened if a folder has not been opened in vscode first. I just fixed it.
  • And about seeing the icon spinning indefinitely there is a problem related to your csproj. Could you provide an example of .csproj file with this problem?

Part of the problem with the never ending wait, may be that the folder has several .sln files in it and each solution as at least one csproj in them. The other thing is that the solutions and csproj files do not live in the same directory. All the solutions are at the root of our git repos and the projects are in subfolders of a "source" folder. BTW, none of the projects I tried to expand opened. But I only tried a handful. And the ones that I did try were .net 6.0 in the new format (I believe). If this is not a problem for most people I would not waste a lot of time on this. I just do too much C# development and can't live with VS Code for that. Our systems are too complex to develop in VS Code, I think. And we debug our websites in IIS Express, so I am finding our web development hard to do in VS Code as well. So I think I'm going back to VS 2022.

fernandoescolar commented 1 year ago

Let's see in the next version with the latest changes of @panoskj the second issue will be solved as well....

DanielHJA commented 1 year ago

Hi, sorry to barge in on this thread, but I am just wondering if this has been addressed.

I am trying to open an .sln file, but nothing is happening when I press open in any version.

panoskj commented 1 year ago

The author of this issue actually reported 2 different issues at once:

  1. open code, open a solution, nothing happens
  2. open code, open a folder, in the "EXPLORER" under the "SOLUTION" section, expand a project, see spinning icon indefinitely.

If I understand correctly, the first issue should have been resolved by this commit.

As for the second issue, #257 fixes a bug that results in "spinning icon indefinitely". But for all we know there could be multiple bugs resulting in "spinning icon indefinitely".

Are you saying you are experiencing the first issue? Could you describe the steps to reproduce it more precisely? Did you try opening a folder as a workaround (like the author of this issue did)?

DanielHJA commented 1 year ago

Sorry, I was a bit quick in my message. Yes, the first issue is not working for me.

1: Installed visual studio code, SDK etc

  1. Installed the c# omnisharp package
  2. installed vscode-solution-explorer
  3. Pressed 'Open solution' and selected my .sln file
  4. Nothing happens
panoskj commented 1 year ago

So you refer to the first issue. I just checked and saw the last release was on January 3rd, while the fix for this issue was merged on the 12th, so it looks like the fix hasn't been released yet. You could download the repository and build it yourself to get the fix, or you could try opening the solution's folder instead (your solution should be loaded successfully in this case).