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

not working for .NetCore #121

Open
hotyes opened this issue Feb 19, 2019 · 10 comments
Open

not working for .NetCore #121

hotyes opened this issue Feb 19, 2019 · 10 comments

Comments

@hotyes
Copy link

hotyes commented Feb 19, 2019

I am trying to use it on my .net core library but when I use dotnet build I got error /usr/local/share/dotnet/sdk/2.2.200-preview-009813/FSharp/Microsoft.FSharp.Targets(271,9): error MSB6006: "fsc.exe" exited with code 8

Runtime Environment:
OS Name: Mac OS X
OS Version: 10.14
OS Platform: Darwin
RID: osx.10.14-x64
Base Path: /usr/local/share/dotnet/sdk/2.2.200-preview-009813/

Host (useful for support):
Version: 3.0.0-preview1-26621-01
Commit: fc01d68000

the workaround dotnet/fsharp#3303 here is not work for me

@isaacabraham
Copy link
Collaborator

Thanks for this - will look into it. @tforkmann is this what you saw? @bruinbrown any chance you can test this out on your mac?

@isaacabraham
Copy link
Collaborator

@hotyes you shouldn't need to do any workaround from my understanding. At least, on windows it works "out of the box" on netcore; evidently that's not the case on mac.

@j-sauer
Copy link

j-sauer commented May 10, 2019

Any news on this? I get the same error on Mac OS X with dotnet sdk 2.2.104.
If I can help somehow to fix this, just let me know.

@tforkmann
Copy link
Contributor

tforkmann commented May 11, 2019

@j-sauer what IDE are you using? Did you tried to use the latest dotnet core 3 preview version 5? It comes with fsi and that solved a lot of problems for me.

@j-sauer
Copy link

j-sauer commented May 11, 2019

I'm using VS Code. Autocompletion works fine, but dotnet build results in this error.
Nope did not use core 3 preview so far. I will give a try.

@isaacabraham
Copy link
Collaborator

@j-sauer this could be related to incompatibility with FSharp Compiler Tools, which I'm in the process of removing. I'll put a beta version of the package out for you to test.

@j-sauer
Copy link

j-sauer commented May 12, 2019

Using .net core preview 5 I get the following error when running dotnet build:

/usr/local/share/dotnet/sdk/3.0.100-preview5-011568/FSharp/Microsoft.FSharp.Targets(277,9): error MSB6003: The specified task executable "fsc.exe" could not be run. System.ComponentModel.Win32Exception (8): Exec format error [/Users/jens/Documents/Code/AzureTabletest/AzureTabletest.fsproj]
/usr/local/share/dotnet/sdk/3.0.100-preview5-011568/FSharp/Microsoft.FSharp.Targets(277,9): error MSB6003: at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec) [/Users/jens/Documents/Code/AzureTabletest/AzureTabletest.fsproj]
/usr/local/share/dotnet/sdk/3.0.100-preview5-011568/FSharp/Microsoft.FSharp.Targets(277,9): error MSB6003: at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) [/Users/jens/Documents/Code/AzureTabletest/AzureTabletest.fsproj]
/usr/local/share/dotnet/sdk/3.0.100-preview5-011568/FSharp/Microsoft.FSharp.Targets(277,9): error MSB6003: at System.Diagnostics.Process.Start() [/Users/jens/Documents/Code/AzureTabletest/AzureTabletest.fsproj]
/usr/local/share/dotnet/sdk/3.0.100-preview5-011568/FSharp/Microsoft.FSharp.Targets(277,9): error MSB6003: at Microsoft.Build.Utilities.ToolTask.ExecuteTool(String pathToTool, String responseFileCommands, String commandLineCommands) [/Users/jens/Documents/Code/AzureTabletest/AzureTabletest.fsproj]
/usr/local/share/dotnet/sdk/3.0.100-preview5-011568/FSharp/Microsoft.FSharp.Targets(277,9): error MSB6003: at FSharp.Build.Fsc.ExecuteTool(String pathToTool, String responseFileCommands, String commandLineCommands) [/Users/jens/Documents/Code/AzureTabletest/AzureTabletest.fsproj]
/usr/local/share/dotnet/sdk/3.0.100-preview5-011568/FSharp/Microsoft.FSharp.Targets(277,9): error MSB6003: at Microsoft.Build.Utilities.ToolTask.Execute() [/Users/jens/Documents/Code/AzureTabletest/AzureTabletest.fsproj]

@j-sauer
Copy link

j-sauer commented Jul 15, 2019

Any news about this? If I can help, just let me know.

@isaacabraham
Copy link
Collaborator

@j-sauer There's a branch that's supposed to fix this but I'm stuck at the moment - I simply can't get the build to work in VS or Ionide in the editor, although code compiles when sent to FSI! Can you try out the get-stuff-working branch locally (build and reference the built dlls from a script)?

I'm as frustrated as anyone with this because the project is effectively blocked at the moment - I have no idea at all what's wrong with the type provider :-/

@ironpercival
Copy link

ironpercival commented Aug 28, 2019

@isaacabraham hi Isaac, I managed to resolve this for my build so maybe it gives you some clue for a global fix. Long story short, I came up with an explicit Mono compiler settings in fsproj:

<PropertyGroup> <DisableAutoSetFscCompilerPath>true</DisableAutoSetFscCompilerPath> <DotnetFscCompilerPath></DotnetFscCompilerPath> <FscToolPath>/Library/Frameworks/Mono.framework/Versions/Current/Commands</FscToolPath> <FscToolExe>fsharpc</FscToolExe> </PropertyGroup>

This solves the build for me. But I did not invent this solution myself (that's why long story): I inferred it from a solution for another issue, somewhat similar (also Mac/Mono related), but with SqlProvider and more tricks needed (like copying DLLs etc). Luckily with StorageProvider no such tricks are needed and fsproj snippet provided above was the minimal necessary patch for me. Hope it helps somehow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants