Closed smcl closed 2 years ago
See #1041 for more info.
I still don't know why #1401 wasn't merged. @Krzysztof-Cieslak
Ah @olivercoad you're right, sorry I didn't realise. It does indeed seem that this activation event can catch all sorts of non-F# projects:
"workspaceContains:**/*.sln",
Duplicate of #1041
@Krzysztof-Cieslak Would you mind giving a quick explanation why Ionide shouldn’t behave as I and a couple of others here and on #1041 think it should? You've acknowledged the issue at hand here:
It’s .Net project so I assume it has .sln file. As stated before in the thread presence of .sln file is one of the activation events of the plugin
Is there an issue with removing the **/*.sln
activation event that causes this that I am not seeing? Because honestly this behaviour is a little bit over-eager. Right now Ionide thinks EVERY folder that contains a Visual Studio .sln
somewhere in it is an F# project, when it could be C# or D (as described in my example) or anything else. It is quite an annoying issue with, apparently, a very easy fix that doesn’t seem to interfere with Ionide's ability to activate when it encounters F# projects (.fsproj files).
This is not a duplicate of #1041. That issue addressed just one symptom. https://github.com/fsharp/FsAutoComplete/pull/668 was always just a band-aid fix and was never meant to be the only measure taken. I'm quite disapponted to see this issue and 1401 be closed without an explaination and would still like to see it merged.
Describe the bug
If you have created C# or D project with Visual Studio (I've tried 2019 and 2022) in Visual Studio Code with Ionide for F# installed, Ionide thinks it's an F# project so a few seconds after you open it the F# Solution Explorer opens up on the left. It's not the worst thing in the world but it is quite irritating and feels wrong.
Ionide is presumably looking for the existence of a .sln file or .csproj file, rather than trying to detect whether F# is used at all.
Steps to reproduce
Prerequisites:
To reproduce the issue:
Link to sample reproduction
I have created a repo which contains two projects: https://github.com/smcl/ionide-issue
You can reproduce the issue by opening either of the folders with VS Code (note: if you open the top-level it won't reproduce, you need to drill down at least one level into either folder).
Expected behaviour
Since there are no .fsproj or .fs files or anything to do with F#, I don't think Ionide should try to start up or do anything, and importantly it shouldn't raise the F# Solution Explorer.
Screenshots
n/a
Machine info
Additional context
n/a