Ionide-vscode-fsharp: language service fails to start with fsacRuntime:netcore in v3.15.0

Created on 21 Dec 2017  路  11Comments  路  Source: ionide/ionide-vscode-fsharp

I opened vscode after update and got the following error:
Failed to start language services. Please check if Microsoft Build Tools 2013 are installed
My VS is up to date 15.5.2 (which is flaky as always), but all build tasks were working in Ionide before updating to 3.15.0.

Has the way MSBUILD is located changed? Do we now manually have to start setting path even though was working before?

Thanks in advance for any assistance, I notice MSBUILD is not located in C:\Program Files (x86)\MSBuild\14.0\Bin but was working before which is confusing.

Is there a way I can roll back the update? Thanks in advance.

bug

All 11 comments

I think I have the same issue - if you check the language service output I bet you'll get something like:

[16:26:03 ERROR] Failed to start language services. Error:
  An assembly specified in the application dependencies manifest (fsautocomplete.deps.json) was not found:
    package: 'System.Security.AccessControl', version: '4.4.1'
    path: 'runtimes/win/lib/netcoreapp2.0/System.Security.AccessControl.dll'

Yes, fsacRuntime: netcore fails to start with ionide 3.15.0.

the message is wrong becase is the default message if FSAC (runtime: .net) fails to start

I'll check why

issue is, latest ionide has packaged fsac .netcore with a wrong directory structure.

meanwhile, to fix it as workaround (win/unix, mac doesnt work):

OR use .NET language service, using default setting fsacRuntime: net

OR fix the fsasc netcore, doing:

  • run vscode. open the Output panel -> F# language service (server)

image

  • see the path there fsacautocomplete.dll is located.
  • create, in the fsautocomplete.dll directory, a subdirectory

    • runtimes/win/lib/netcoreapp2.0/ for windows

    • runtimes/unix/lib/netcoreapp2.0/ for unix

  • copy System.Security.AccessControl.dll inside that subdirectory
  • copy System.Security.Principal.Windows.dll inside that subdirectory

Thanks @Enricosada , I was using .netcore FSAC , via settings before this update so made no sense, but hopefully fixing folder structure will do the trick... I kinda knew was not related to MSBUILD disappearing.

This doesn't work on a mac after I do this I get the error:

Unhandled Exception: System.AggregateException: One or more errors occurred. (WrappedError(Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure "fsstrings.resources" was correctly embedded or linked into assembly "FSharp.Compiler.Service" at compile time, or that all the satellite assemblies required are loadable and fully signed.)) ---> Microsoft.FSharp.Compiler.ErrorLogger+WrappedError: WrappedError(Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure "fsstrings.resources" was correctly embedded or linked into assembly "FSharp.Compiler.Service" at compile time, or that all the satellite assemblies required are loadable and fully signed.)
   at Microsoft.FSharp.Compiler.Lexhelp.reusingLexbufForParsing[a](LexBuffer`1 lexbuf, FSharpFunc`2 f)
   at Microsoft.FSharp.Compiler.SourceCodeServices.Parser.parseFile(String source, String fileName, FSharpParsingOptions options, String userOpName)
   at <StartupCode$FSharp-Compiler-Service>[email protected](Unit unitVar)
   at [email protected](AsyncParams`1 args)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.FSharp.Control.AsyncBuilderImpl.commit[a](AsyncImplResult`1 res)
   at Microsoft.FSharp.Control.CancellationTokenOps.RunSynchronouslyInCurrentThread[a](CancellationToken token, FSharpAsync`1 computation)
   at Microsoft.FSharp.Control.CancellationTokenOps.RunSynchronously[a](CancellationToken token, FSharpAsync`1 computation, FSharpOption`1 timeout)
   at Microsoft.FSharp.Control.FSharpAsync.RunSynchronously[T](FSharpAsync`1 computation, FSharpOption`1 timeout, FSharpOption`1 cancellationToken)
   at <StartupCode$FsAutoComplete-Core>[email protected](String file) in D:\Programowanie\ionide\paket-files\github.com\fsharp\FsAutoComplete\src\FsAutoComplete.Core\Commands.fs:line 104
   at Microsoft.FSharp.Collections.ArrayModule.Parallel.Iterate@1314.Invoke(Int32 obj)
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`1.<ForWorker>b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`1.<ForWorker>b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
   at System.Threading.Tasks.TaskReplicator.Replica`1.ExecuteAction(Boolean& yieldedBeforeCompletion)
   at System.Threading.Tasks.TaskReplicator.Replica.Execute()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.TaskReplicator.Run[TState](ReplicatableUserAction`1 action, ParallelOptions options, Boolean stopOnFirstFailure)
   at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Threading.Tasks.Parallel.ThrowSingleCancellationExceptionOrOtherException(ICollection exceptions, CancellationToken cancelToken, Exception otherException)
   at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)
   at System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, Action`1 body)
   at Microsoft.FSharp.Collections.ArrayModule.Parallel.Iterate[T](FSharpFunc`2 action, T[] array)
   at <StartupCode$FsAutoComplete-Core>[email protected](Unit unitVar) in D:\Programowanie\ionide\paket-files\github.com\fsharp\FsAutoComplete\src\FsAutoComplete.Core\Commands.fs:line 90
   at [email protected](AsyncParams`1 args)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.FSharp.Control.CancellationTokenOps.Start@1292-1.Invoke(ExceptionDispatchInfo edi)
   at <StartupCode$FSharp-Core>.$Control.loop@425-51(Trampoline this, FSharpFunc`2 action)
   at Microsoft.FSharp.Control.Trampoline.ExecuteAction(FSharpFunc`2 firstAction)
   at <StartupCode$FSharp-Core>[email protected](Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadPoolWorkQueue.Dispatch()

I can reproduce on Windows same error as @7sharp9 :

image

Well... that's why .Net Core FSAC support is experimental ;-)

Is there a way I can roll back the update?

All versions of Ionide are listed in GitHub releases - https://github.com/ionide/ionide-vscode-fsharp/releases

You can install any vsix from command line or from the editor - https://code.visualstudio.com/docs/editor/extension-gallery#_install-from-a-vsix (Tho, I belive you also need to disable automatic update of extensions in settings)

added https://github.com/Microsoft/visualfsharp/issues/4150 about the resource error. is in FCS, the resource name is generated wrongly

macOS workaround:

On macOS it is easier to not use netcore for fsac runtime until this got fixed instead of deactivating updates and rolling back to an older version. Works for me this way now.

Should be fixed in 3.15.1

Thanks guys, working great once again.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

isaacabraham picture isaacabraham  路  3Comments

isaacabraham picture isaacabraham  路  5Comments

alfonsogarciacaro picture alfonsogarciacaro  路  5Comments

isaacabraham picture isaacabraham  路  5Comments

cloudRoutine picture cloudRoutine  路  5Comments