Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FSAC Runtime = netcore does not work with fsx #948

Closed
isaacabraham opened this issue Oct 20, 2018 · 20 comments
Closed

FSAC Runtime = netcore does not work with fsx #948

isaacabraham opened this issue Oct 20, 2018 · 20 comments
Labels
reproduction needed Bug reports that can't be reproduced by maintainers

Comments

@isaacabraham
Copy link

Switching to netcore for FSAC Runtime (as suggested by Ionide) does not work - I get no intellisense, no tooltips etc..

F# Language Service says stuff like the following:

[19:55:49 ERROR] Cannot execute lint, File 'c:\Users\Isaac\Source\Repos\fsharp-demo\FSharpDemo\Scripts\foo.fsx' not parsed 
[19:55:49 ERROR] Cannot execute unusedOpens, File 'c:\Users\Isaac\Source\Repos\fsharp-demo\FSharpDemo\Scripts\foo.fsx' not parsed 
[19:55:49 ERROR] Cannot execute unusedDeclarations, File 'c:\Users\Isaac\Source\Repos\fsharp-demo\FSharpDemo\Scripts\foo.fsx' not parsed 
[19:55:49 ERROR] Cannot execute simplifiedNames, File 'c:\Users\Isaac\Source\Repos\fsharp-demo\FSharpDemo\Scripts\foo.fsx' not parsed 

Anything I need to do e.g. specific version of netcore?

@Krzysztof-Cieslak
Copy link
Member

Since I can see .fsx file - it's probably duplicate of #656.

Please check, if it's working fine with any project, clearing cache / removing obj may be required

@melston
Copy link

melston commented Oct 23, 2018

I am having the same problem. What is meant by "clearing cache"? I tried removing the obj directory of my projects but that had no impact.

@dougferg
Copy link

I tried clearing the cache (by pressing CTRL + SHIFT + P and then typing F#: Clear Cache) in VSCode . I've experienced the problem with old/new projects on different computers as well as new single file fsx files. Clearing the cache didn't affect anything.

@dburriss
Copy link

Ran into this with fsx files. I ended up uninstalling VS Code and deleting %userprofile%\AppData\Roaming\Code and %userprofile%\.vscode

I was experiencing this with net and netcore.
Clear cache didnt help.

2 things that happened around the time it stopped working. I was switching between .net and core in the workspace settings and I updated VS.

@da9l
Copy link

da9l commented Nov 12, 2018

Uninstalling vscode per @dburriss suggestion worked well for me now. I decided to stay on "FSharp.fsacRuntime": "net" tho.
I'm guessing that this problem maybe is related with #938 and #949.

@Krzysztof-Cieslak Krzysztof-Cieslak added the reproduction needed Bug reports that can't be reproduced by maintainers label Nov 14, 2018
@sliepie
Copy link

sliepie commented Nov 21, 2018

Could reproduce this with the following:

Clean VSCode install, Ionide installed and following user settings:

{
    "FSharp.fsacRuntime": "netcore",
    "FSharp.logLanguageServiceRequestsOutputWindowLevel": "DEBUG"
}
  • Install fake templates dotnet new -i "fake-template::*"

  • Create new directory and run dotnet new fake inside

  • Load directory in Code and open build.fsx

  • Look at output of F# Language Service

        [14:54:15 INFO ] Netcore runtime specified
        [14:54:16 INFO ] finding FSAC for
            runtime: NetcoreFdd
            mono: mono
            dotnet: C:\Program Files\dotnet\dotnet.exe
        [14:54:17 INFO ] listening notification on /notify started
        [14:54:17 INFO ] listening notification on /notifyWorkspace started
        [14:54:17 INFO ] listening notification on /notifyAnalyzer started
        [14:54:17 DEBUG] REQ (001) -> {compilerlocation}
        Data=""
        [14:54:17 DEBUG] REQ (002) -> {lint}, File = "~\build.fsx"
        Data={"FileName":"c:\\source\\ionide-repo\\build.fsx"}
        [14:54:17 DEBUG] REQ (003) -> {unusedOpens}, File = "~\build.fsx"
        Data={"FileName":"c:\\source\\ionide-repo\\build.fsx"}
        [14:54:17 DEBUG] REQ (004) -> {unusedDeclarations}, File = "~\build.fsx"
        Data={"FileName":"c:\\source\\ionide-repo\\build.fsx"}
        [14:54:17 DEBUG] REQ (005) -> {simplifiedNames}, File = "~\build.fsx"
        Data={"FileName":"c:\\source\\ionide-repo\\build.fsx"}
        [14:54:17 DEBUG] REQ (006) -> {workspacePeek}
        Data={"Directory":"c:\\source\\ionide-repo","Deep":2,"ExcludedDirs":[".git","paket-files",".fable"]}
        [14:54:17 DEBUG] REQ (007) -> {declarations}, File = "~\build.fsx"
        Data={"FileName":"c:\\source\\ionide-repo\\build.fsx","Lines":["#load \".fake/build.fsx/intellisense.fsx\"\r","open Fake.Core\r","open Fake.DotNet\r","open Fake.IO\r","open Fake.IO.FileSystemOperators\r","open Fake.IO.Globbing.Operators\r","open Fake.Core.TargetOperators\r","\r","Target.create \"Clean\" (fun _ ->\r","    !! \"src/**/bin\"\r","    ++ \"src/**/obj\"\r","    |> Shell.cleanDirs \r",")\r","\r","Target.create \"Build\" (fun _ ->\r","    !! \"src/**/*.*proj\"\r","    |> Seq.iter (DotNet.build id)\r",")\r","\r","Target.create \"All\" ignore\r","\r","\"Clean\"\r","  ==> \"Build\"\r","  ==> \"All\"\r","\r","Target.runOrDefault \"All\"\r",""],"Version":0}
        [14:54:17 DEBUG] RES (004) <- {unusedDeclarations} in 293 ms: Kind={"error"}
        Data={"Code":1,"Message":"File 'c:\\source\\ionide-repo\\build.fsx' not parsed","AdditionalData":{}}
        [14:54:17 ERROR] Cannot execute unusedDeclarations, File 'c:\source\ionide-repo\build.fsx' not parsed 
        [14:54:17 DEBUG] RES (002) <- {lint} in 298 ms: Kind={"error"}
        Data={"Code":1,"Message":"File 'c:\\source\\ionide-repo\\build.fsx' not parsed","AdditionalData":{}}
        [14:54:17 ERROR] Cannot execute lint, File 'c:\source\ionide-repo\build.fsx' not parsed 
        [14:54:17 DEBUG] RES (003) <- {unusedOpens} in 298 ms: Kind={"error"}
        Data={"Code":1,"Message":"File 'c:\\source\\ionide-repo\\build.fsx' not parsed","AdditionalData":{}}
        [14:54:17 ERROR] Cannot execute unusedOpens, File 'c:\source\ionide-repo\build.fsx' not parsed 
        [14:54:17 DEBUG] RES (005) <- {simplifiedNames} in 298 ms: Kind={"error"}
        Data={"Code":1,"Message":"File 'c:\\source\\ionide-repo\\build.fsx' not parsed","AdditionalData":{}}
        [14:54:17 ERROR] Cannot execute simplifiedNames, File 'c:\source\ionide-repo\build.fsx' not parsed 
        [14:54:17 DEBUG] RES (001) <- {compilerlocation} in 305 ms: Kind={"compilerlocation"}
        Data={"Fsc":"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\Common7\\IDE\\CommonExtensions\\Microsoft\\FSharp\\fsc.exe","Fsi":"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\Common7\\IDE\\CommonExtensions\\Microsoft\\FSharp\\fsi.exe","MSBuild":"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\MSBuild\\15.0\\bin\\MsBuild.exe"}
        [14:54:17 DEBUG] RES (006) <- {workspacePeek} in 320 ms: Kind={"workspacePeek"}
        Data={"Found":[{"Type":"directory","Data":{"Directory":"c:\\source\\ionide-repo","Fsprojs":[]}}]}
        [14:54:17 DEBUG] REQ (008) -> {workspaceLoad}
        Data={"Files":[],"DisableInMemoryProjectReferences":false}
        [14:54:17 DEBUG] RES (008) <- {workspaceLoad} in 31 ms: Kind={"workspaceLoad"}
        Data={"Status":"finished"}
        [14:54:17 DEBUG] REQ (009) -> {parse}, File = "~\build.fsx"
        Data={"FileName":"c:\\source\\ionide-repo\\build.fsx","IsAsync":true,"Lines":["#load \".fake/build.fsx/intellisense.fsx\"\r","open Fake.Core\r","open Fake.DotNet\r","open Fake.IO\r","open Fake.IO.FileSystemOperators\r","open Fake.IO.Globbing.Operators\r","open Fake.Core.TargetOperators\r","\r","Target.create \"Clean\" (fun _ ->\r","    !! \"src/**/bin\"\r","    ++ \"src/**/obj\"\r","    |> Shell.cleanDirs \r",")\r","\r","Target.create \"Build\" (fun _ ->\r","    !! \"src/**/*.*proj\"\r","    |> Seq.iter (DotNet.build id)\r",")\r","\r","Target.create \"All\" ignore\r","\r","\"Clean\"\r","  ==> \"Build\"\r","  ==> \"All\"\r","\r","Target.runOrDefault \"All\"\r",""],"Version":1}
        [14:54:17 DEBUG] WebSocket message: '{"Kind":"workspaceLoad","Data":{"Status":"started"}}'
        [14:54:17 DEBUG] WebSocket message: '{"Kind":"workspaceLoad","Data":{"Status":"finished"}}'
        [14:54:17 DEBUG] RES (009) <- {parse} in 171 ms: Kind={"info"}
        Data="Request cancelled (exn was System.ComponentModel.Win32Exception (2): The system cannot find the file specified
            at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
            at System.Diagnostics.Process.Start()
            at FsAutoComplete.Utils.runProcess(FSharpFunc`2 log, String workingDir, String exePath, String args) in D:\\Programowanie\\ionide\\paket-files\\github.com\\fsharp\\FsAutoComplete\\src\\FsAutoComplete.Core\\Utils.fs:line 532
            at Dotnet.ProjInfo.Inspect.msbuild[a](MSBuildExePath msbuildExe, FSharpFunc`2 run, String project, FSharpList`1 args)
            at Dotnet.ProjInfo.Inspect.getProjectInfoOldSdk[a,b,c,d](FSharpFunc`2 log, FSharpFunc`2 msbuildExec, FSharpFunc`2 getArgs, FSharpList`1 additionalArgs, a projPath)
            at FsAutoComplete.NETFrameworkInfoProvider.getInfoFromMsbuild[a](FSharpFunc`2 getArgs, FSharpList`1 additionalProps) in D:\\Programowanie\\ionide\\paket-files\\github.com\\fsharp\\FsAutoComplete\\src\\FsAutoComplete.Core\\NETFrameworkInfoProvider.fs:line 46
            at FsAutoComplete.NETFrameworkInfoProvider.getInstalledNETVersions() in D:\\Programowanie\\ionide\\paket-files\\github.com\\fsharp\\FsAutoComplete\\src\\FsAutoComplete.Core\\NETFrameworkInfoProvider.fs:line 90
            at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
            at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
            at System.Lazy`1.CreateValue()
            at FsAutoComplete.Environment.netReferecesAssembliesTFMLatest() in D:\\Programowanie\\ionide\\paket-files\\github.com\\fsharp\\FsAutoComplete\\src\\FsAutoComplete.Core\\Environment.fs:line 144
            at <StartupCode$FsAutoComplete-Core>.$CompilerServiceInterface.GetProjectOptionsFromScript@510.Invoke(Unit unitVar) in D:\\Programowanie\\ionide\\paket-files\\github.com\\fsharp\\FsAutoComplete\\src\\FsAutoComplete.Core\\CompilerServiceInterface.fs:line 510
            at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2)
            at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction))"
        [14:54:17 DEBUG] REQ (010) -> {declarations}, File = "~\build.fsx"
        Data={"FileName":"c:\\source\\ionide-repo\\build.fsx","Lines":["#load \".fake/build.fsx/intellisense.fsx\"\r","open Fake.Core\r","open Fake.DotNet\r","open Fake.IO\r","open Fake.IO.FileSystemOperators\r","open Fake.IO.Globbing.Operators\r","open Fake.Core.TargetOperators\r","\r","Target.create \"Clean\" (fun _ ->\r","    !! \"src/**/bin\"\r","    ++ \"src/**/obj\"\r","    |> Shell.cleanDirs \r",")\r","\r","Target.create \"Build\" (fun _ ->\r","    !! \"src/**/*.*proj\"\r","    |> Seq.iter (DotNet.build id)\r",")\r","\r","Target.create \"All\" ignore\r","\r","\"Clean\"\r","  ==> \"Build\"\r","  ==> \"All\"\r","\r","Target.runOrDefault \"All\"\r",""],"Version":1}
        [14:54:17 DEBUG] RES (010) <- {declarations} in 188 ms: Kind={"declarations"}
        Data=[{"Declaration":{"UniqueName":"Build_1_of_1","Name":"Build","Glyph":"Module","GlyphChar":"N","IsTopLevel":true,"Range":{"StartColumn":1,"StartLine":1,"EndColumn":26,"EndLine":26},"BodyRange":{"StartColumn":1,"StartLine":1,"EndColumn":1,"EndLine":1},"File":"c:\\source\\ionide-repo\\build.fsx","EnclosingEntity":"M","IsAbstract":false},"Nested":[]}]
        [14:54:17 DEBUG] RES (007) <- {declarations} in 473 ms: Kind={"declarations"}
        Data=[{"Declaration":{"UniqueName":"Build_1_of_1","Name":"Build","Glyph":"Module","GlyphChar":"N","IsTopLevel":true,"Range":{"StartColumn":1,"StartLine":1,"EndColumn":26,"EndLine":26},"BodyRange":{"StartColumn":1,"StartLine":1,"EndColumn":1,"EndLine":1},"File":"c:\\source\\ionide-repo\\build.fsx","EnclosingEntity":"M","IsAbstract":false},"Nested":[]}]

Workaround is:
Changing fsac setting back to net and restarting Code

@hanixer
Copy link

hanixer commented Nov 27, 2018

I have the same problem on Windows. I noticed that if netcore is used then files are prefixed with ~\.

    [14:54:17 DEBUG] REQ (002) -> {lint}, File = "~\build.fsx"
    Data={"FileName":"c:\\source\\ionide-repo\\build.fsx"}
    Data={"Code":1,"Message":"File 'c:\\source\\ionide-repo\\build.fsx' not parsed","AdditionalData":{}}

But when net is used - standard path conventions are applied.

@misterspeedy
Copy link

I just hit this (on Windows). In addition to setting the setting back to 'net' and clearing the cache, (CTRL+SHIFT+P, F# Clear Cache) I found I had to make some code edits before tool tips sprang into life.

@enricosada
Copy link
Contributor

enricosada commented Jan 17, 2019

@isaacabraham try open vscode from a VS Command prompt.

if the msbuild is in PATH (like in VS command prompt) it should work.
That's the limitation to load fsx and old fsproj atm with FSAC .net core, because use msbuild to resolve system assemblu references (like System etc)

@enricosada enricosada changed the title FSAC Runtime = netcore does not work FSAC Runtime = netcore does not work with fsx Jan 17, 2019
@Krzysztof-Cieslak
Copy link
Member

Should be fixed in 3.31.0

@vilinski
Copy link

Thank you! Ionide alone still holds me in .NET, and I think a hordes of other developers too.

@leolorenzoluis
Copy link
Contributor

This issue is still happening in Windows with Ionide 3.38.0. I have to switch to net to make it work for fsx

@Luiz-Monad
Copy link

Luiz-Monad commented Jul 15, 2019

I'm think that >

@isaacabraham try open vscode from a VS Command prompt.

if the msbuild is in PATH (like in VS command prompt) it should work.
That's the limitation to load fsx and old fsproj atm with FSAC .net core, because use msbuild to resolve system assemblu references (like System etc)

Also, the error message isn't very helpful, but I quickly figured it out the problem after I turned on verbose logging FSharp.verboseLogging.

Message: File 'b:\extern\workbench\fullstack\build.fsx' not parsed
  Code: -32603 

Negative codes smell of integration errors (remember the old COM days).

The real error is more helpful.

It would save time if the FSAC had a better error like msbuild info: unexpected MSBuildFailed coming directly from LSP, then I'd immediately figure it out I forgot to install msbuild, for example.

LSP output
[LSP] Notify - Canceled
(InfoRes
    "Request cancelled (exn was System.Exception: error getting msbuild info: unexpected MSBuildFailed
(1,
("C:\Users\LuizMonad\AppData\Local\Temp\tmp28AD.tmp",
    "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\bin\MsBuild.exe",
    "C:\Users\LuizMonad\AppData\Local\Temp\tmp28AD.tmp\EnvironmentInfo.proj /t:_Inspect_GetProperties /p:_Inspect_GetProperties_OutFile=C:\Users\LuizMonad\AppData\Local\Temp\tmp28AE.tmp.GetProperties.txt /p:CustomAfterMicrosoftCommonTargets=C:\Users\LuizMonad\AppData\Local\Temp\tmp28AF.tmp.proj-info.hook.targets /nologo /verbosity:quiet"))
at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenFail@1647.Invoke(String message)
at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy`1.CreateValue()
at Dotnet.ProjInfo.Workspace.NetFWInfo.LatestVersion()
at <StartupCode$FsAutoComplete-Core>.$CompilerServiceInterface.GetProjectOptionsFromScript@462.Invoke(Unit unitVar) in /Users/chris/Programming/ionide-vscode-fsharp/paket-files/github.com/fsharp/FsAutoComplete/src/FsAutoComplete.Core/CompilerServiceInterface.fs:line 462
at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2)
at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction))")
Msbuild output
PS C:\> invoke-expression ((h)[0].CommandLine)
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 7/14/2019 6:51:49 PM.
Project "C:\Users\LuizMonad\AppData\Local\Temp\tmp9021.tmp\EnvironmentInfo.proj" on node 1 (_Inspect_GetProperties target(s)).
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\bin\Microsoft.Common.CurrentVersion.targets(1179,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.0" were not found. To resolve
this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Ass
embly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [C:\Users\LuizMonad\AppData\Local\Temp\tmp9021.tmp\EnvironmentInfo.proj]
Done Building Project "C:\Users\LuizMonad\AppData\Local\Temp\tmp9021.tmp\EnvironmentInfo.proj" (_Inspect_GetProperties target(s)) -- FAILED.


Build FAILED.

"C:\Users\LuizMonad\AppData\Local\Temp\tmp9021.tmp\EnvironmentInfo.proj" (_Inspect_GetProperties target) (1) ->
(GetReferenceAssemblyPaths target) ->
  C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\bin\Microsoft.Common.CurrentVersion.targets(1179,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.0" were not found. To resolv
e this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global A
ssembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [C:\Users\LuizMonad\AppData\Local\Temp\tmp9021.tmp\EnvironmentInfo.proj]

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:00.64
Which one of them should be in the path?
PS C:\> ls -Recurse -Include @("msbuild.exe"; "msbuild.dll") -ErrorAction SilentlyContinue | select -expand fullname
C:\Program Files\dotnet\sdk\2.2.301\ref\MSBuild.dll
C:\Program Files\dotnet\sdk\2.2.301\MSBuild.dll
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\amd64\MSBuild.exe
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\amd64\MSBuild.exe
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe
C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild.exe
C:\Users\LuizMonad\.vscode\extensions\ms-vscode.csharp-1.20.0\.omnisharp\1.32.20\.msbuild\Current\Bin\MSBuild.exe
C:\Windows\assembly\GAC_32\MSBuild\3.5.0.0__b03f5f7f11d50a3a\MSBuild.exe
C:\Windows\assembly\GAC_64\MSBuild\3.5.0.0__b03f5f7f11d50a3a\MSBuild.exe
C:\Windows\Microsoft.NET\assembly\GAC_32\MSBuild\v4.0_12.0.0.0__b03f5f7f11d50a3a\MSBuild.exe
C:\Windows\Microsoft.NET\assembly\GAC_32\MSBuild\v4.0_4.0.0.0__b03f5f7f11d50a3a\MSBuild.exe
C:\Windows\Microsoft.NET\assembly\GAC_64\MSBuild\v4.0_4.0.0.0__b03f5f7f11d50a3a\MSBuild.exe
C:\Windows\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe
C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe
C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\MSBuild.exe
C:\Windows\Microsoft.NET\Framework64\v3.5\MSBuild.exe
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe
C:\Windows\WinSxS\amd64_msbuild_b03f5f7f11d50a3a_10.0.17763.1_none_f5a7250c35a55a6e\MSBuild.exe
C:\Windows\WinSxS\amd64_msbuild_b03f5f7f11d50a3a_3.5.17763.1_none_e1dfb46a1ccf92e8\MSBuild.exe
C:\Windows\WinSxS\amd64_msbuild_b03f5f7f11d50a3a_4.0.15713.0_none_da500ddf9f3ce843\MSBuild.exe
C:\Windows\WinSxS\x86_msbuild_b03f5f7f11d50a3a_10.0.17763.1_none_3d545be34a218374\MSBuild.exe
C:\Windows\WinSxS\x86_msbuild_b03f5f7f11d50a3a_3.5.17763.1_none_85c118e6647221b2\MSBuild.exe
C:\Windows\WinSxS\x86_msbuild_b03f5f7f11d50a3a_4.0.15713.0_none_21fd44b6b3b91149\MSBuild.exe

I guess any, or the latest.

How can I change to use the new project if FSX doesn't have project system?
Is that a FAKE problem? or it's a fsac problem?

Other info:

Id: ionide.ionide-fsharp
Version: 4.0.6

@jannesiera
Copy link

I've encountered a similar issue. While using an anonymous record in a dependency project, I was unable to put any breakpoints. Refactoring away from anon records fixed the issue.

I couldn't figure out what was going on until I found the issue reported here.

@thomastay
Copy link

thomastay commented Aug 20, 2019

I'm having the same issue with .NET core. I'm running on Linux (Ubuntu 18.04), Ionide 4.0.6
Repro steps:

  1. Create a fresh folder, create a main.fsx file
  2. Populate that fsx file with information. Open it in code
    Relevant logs in the Fsharp debug output:
[LSP] Notify - Workspace (WorkspaceLoad true)
[LSP call] TextDocumentDidOpen - workspace ready
[LSP] Notify - Canceled
  (InfoRes
     "Request cancelled (exn was System.ComponentModel.Win32Exception (2): No such file or directory
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at Dotnet.ProjInfo.Workspace.Utils.runProcess(FSharpFunc`2 log, String workingDir, String exePath, String args)
   at Dotnet.ProjInfo.Inspect.msbuild[a](MSBuildExePath msbuildExe, FSharpFunc`2 run, String project, FSharpList`1 args)
   at Dotnet.ProjInfo.Inspect.getProjectInfo[a,b,c](FSharpFunc`2 log, FSharpFunc`2 msbuildExec, FSharpFunc`2 getArgs, FSharpList`1 additionalArgs, String projPath)
   at Dotnet.ProjInfo.Workspace.NETFrameworkInfoProvider.getInstalledNETVersions(MSBuildExePath msbuildHost)
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
   at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
   at System.Lazy`1.CreateValue()
   at Dotnet.ProjInfo.Workspace.NetFWInfo.LatestVersion()
   at <StartupCode$FsAutoComplete-Core>.$CompilerServiceInterface.GetProjectOptionsFromScript@462.Invoke(Unit unitVar) in /Users/chris/Programming/ionide-vscode-fsharp/paket-files/github.com/fsharp/FsAutoComplete/src/FsAutoComplete.Core/CompilerServiceInterface.fs:line 462
   at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2)
   at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction))

@thomastay
Copy link

@enricosada how do I change my PATH to point to msbuild? I cannot open from VS command prompt as I'm running on linux. I don't even know where msbuild is on my linux box... is that the dotnet executable?

@markvincze
Copy link

Hey @thomastay,
I'm having the exact same issue, both with .net and .netcore, I'm on Windows 10.
Have you found a solution for this since then?
(If I open an actual project with an fsproj, then it works without any issues.)

@mastoj
Copy link

mastoj commented Dec 1, 2019

I also struggle with netcore, but it does work when I changed it to net. Any idea of what I can do? How can I help debug this?

@baronfel
Copy link
Contributor

baronfel commented Dec 1, 2019

@mastoj did you set the useSdkScripts setting to true as well? And are you on .net core 3.0.100 at minimum?

@mastoj
Copy link

mastoj commented Dec 1, 2019

@baronfel thanks, that solved it for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reproduction needed Bug reports that can't be reproduced by maintainers
Development

No branches or pull requests