AzureStorageTypeProvider icon indicating copy to clipboard operation
AzureStorageTypeProvider copied to clipboard

not working for .NetCore

Open hotyes opened this issue 6 years ago • 10 comments

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 https://github.com/Microsoft/visualfsharp/issues/3303 here is not work for me

hotyes avatar Feb 19 '19 16:02 hotyes

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 avatar Feb 19 '19 17:02 isaacabraham

@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.

isaacabraham avatar Feb 19 '19 17:02 isaacabraham

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.

j-sauer avatar May 10 '19 18:05 j-sauer

@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.

tforkmann avatar May 11 '19 04:05 tforkmann

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.

j-sauer avatar May 11 '19 10:05 j-sauer

@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.

isaacabraham avatar May 11 '19 14:05 isaacabraham

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 avatar May 12 '19 07:05 j-sauer

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

j-sauer avatar Jul 15 '19 09:07 j-sauer

@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 :-/

isaacabraham avatar Jul 16 '19 08:07 isaacabraham

@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.

ironpercival avatar Aug 28 '19 09:08 ironpercival