I updated to dotnet sdk 5.0.200 today and now when I open vscode, all my F# projects fail to load. If I then click on Project loading failed in the status bar, at the end I see this:
Using "Fsc" task from assembly "/usr/share/dotnet/sdk/5.0.200/FSharp/FSharp.Build.dll". Task "Fsc" The specified task executable location "/usr/share/dotnet/sdk/5.0.200/FSharp/fsc.exe" is invalid. Done executing task "Fsc" -- FAILED. Done building target "CoreCompile" in project "App.Client.fsproj" -- FAILED. Done building project "App.Client.fsproj" -- FAILED.
I checked and /usr/share/dotnet/sdk/5.0.200/FSharp/fsc.exe is missing from the directory.
Open a workspace containing F# projects that contain:
<TargetFramework>net5.0</TargetFramework>
Projects should load successfully.
Add any other context about the problem here.
Hey @Bananas-Are-Yellow :wave:,
Thank you for opening an issue. We will get back to you as
soon as we can. Also, check out our OpenCollective and consider
backing us.
https://opencollective.com/ionide
PS.: We offer
backersupport for all backers. Don't forget to addbackerlabel when you start backing us :smile:
came here to say the same thing. Seems like between 5.0.103 and 5.0.200 it was renamed from fsc.exe to fsc.dll:
$ ls /usr/local/share/dotnet/sdk/5.0.103/FSharp/
cs default.win32manifest Microsoft.Build.Utilities.Core.dll
de fsc.deps.json Microsoft.DotNet.DependencyManager.dll
es fsc.exe Microsoft.FSharp.NetSdk.props
fr fsc.runtimeconfig.json Microsoft.FSharp.NetSdk.targets
it FSharp.Build.dll Microsoft.FSharp.Overrides.NetSdk.targets
ja FSharp.Compiler.Interactive.Settings.dll Microsoft.FSharp.Targets
ko FSharp.Compiler.Private.dll Microsoft.Portable.FSharp.Targets
pl FSharp.Core.dll Microsoft.Win32.SystemEvents.dll
pt-BR FSharp.DependencyManager.Nuget.dll System.CodeDom.dll
ru fsi.deps.json System.Drawing.Common.dll
runtimes fsi.exe System.Resources.Extensions.dll
tr fsi.runtimeconfig.json System.Security.Permissions.dll
zh-Hans Microsoft.Build.Framework.dll System.Windows.Extensions.dll
zh-Hant Microsoft.Build.Tasks.Core.dll
$ ls /usr/local/share/dotnet/sdk/5.0.200/FSharp/
cs default.win32manifest Microsoft.Build.Tasks.Core.dll
de fsc.deps.json Microsoft.Build.Utilities.Core.dll
es fsc.dll Microsoft.DotNet.DependencyManager.dll
fr fsc.runtimeconfig.json Microsoft.FSharp.NetSdk.props
it FSharp.Build.dll Microsoft.FSharp.NetSdk.targets
ja FSharp.Compiler.Interactive.Settings.dll Microsoft.FSharp.Overrides.NetSdk.targets
ko FSharp.Compiler.Private.dll Microsoft.FSharp.Targets
pl FSharp.Core.dll Microsoft.Portable.FSharp.Targets
pt-BR FSharp.Core.xml Microsoft.Win32.SystemEvents.dll
ru FSharp.DependencyManager.Nuget.dll System.CodeDom.dll
runtimes fsi.deps.json System.Drawing.Common.dll
tr fsi.dll System.Resources.Extensions.dll
zh-Hans fsi.runtimeconfig.json System.Security.Permissions.dll
zh-Hant Microsoft.Build.Framework.dll System.Windows.Extensions.dl
It seems that this change breaks our project-cracking (the first step in typechecking) which is provided by #ionide/proj-info, where we already are tracking this issue, just with less of an idea of what the root cause was.
As a temporary workaround I downgraded dotnet using
apt install dotnet-sdk-5.0=5.0.103-1
From chat with @baronfel, some possibilities:
Will need to track down the cause of moving to fsc.dll instead of fsc.exe, but the same layout is also present in .NET 6 preview SDK, so my suspicion is there was some work in the SDK to move stuff around and "unify" across trains. I'm not aware of any intentional factoring on the F# side to move to fsc.dll, but I could also be wrong
Should/can Ionide fall-back to fsc.dll when fsc.exe is not available, or is this to be left to upstream to resolve?
Is there an estimate of how long will it take to fix upstream?
In the meanwhile Ionide is broken and people will be complaining here.
We're actively working this, in the meantime I can only suggest staying on 5.0.1xx. Please note that this is a free product so you should manage your support expectations accordingly.
Should/can Ionide fall-back to fsc.dll when fsc.exe is not available
We don't control Fsc MsBuild task.
A happy update: we believe that https://github.com/ionide/proj-info/pull/100 should fix this issue (and the _many_ other issues reported recently with the same root cause), and we'll be looking to incorporate that into FSAC and push an update of ionide soon.
This is solved in Ionide 5.4.0, released earlier today.
I can confirm that this is indeed fixed with Ionide 5.4.0. It is now OK to use dotnet SDK 5.0.200.
All my F# projects now open.
Thanks for such a fast fix.
Most helpful comment
A happy update: we believe that https://github.com/ionide/proj-info/pull/100 should fix this issue (and the _many_ other issues reported recently with the same root cause), and we'll be looking to incorporate that into FSAC and push an update of ionide soon.