ionide / ionide-vscode-fsharp

VS Code plugin for F# development
http://ionide.io
MIT License
849 stars 276 forks source link

F# Solution Explorer doesn't recognize the project language type at startup #1968

Open regolas opened 6 months ago

regolas commented 6 months ago

Describe the bug

Whenever I have a project in VSCode and I start or restart VSCode, it automatically opens the F# solution explorer instead of the Explorer view.

Steps to reproduce

start or restart VSCode with another language type (e.g. C#) project in the file explorer.

Link to sample reproduction

I mostly do C#. It happens with C# on any project

Expected behaviour

Explorer view should open unless the project is F#

Screenshots

image

Machine info

Additional context

MangelMaxime commented 5 months ago

I believe what is happening is that Ionide is being activated because there is a .sln file.

By default once it is loaded Ionide, will open the F# explorer view. You can disable that behaviour by using the setting "FSharp.showExplorerOnStartup": false.

@baronfel Perhaps we could auto-open the F# solution explorer only if there is at least 1 fsproj in the selected solution? I don't know if this panel displays the information of the active sln or all the sln/fsproj in the repository.

regolas commented 5 months ago

@MangelMaxime , Thanks for the comment and I concur with your analysis. The project is a C# project so, it would make sense not to have Ionide open the F# solution explorer. However, would you want to always have the explorer off even for F# projects?

MangelMaxime commented 4 months ago

However, would you want to always have the explorer off even for F# projects?

Personally, I never use the solution explorer even if I contributed to it 😅

I just prefer the File explorer view because I am working on Front end code, so I need to see both the F# code and CSS files etc.

You can also decide to de-activate it per project, but adding configuration to your workspace .vscode/settings.json.

djongepier commented 1 month ago

Don't know if this is new, but to add to the 'issue', whenever de F# project view is loaded before the solution explorer, an error is displayed that <solution> is already occupied and cannot be used.

Work-around by disabling the startup loading of the F# Explorer is good enough for now.