fsprojects / AzureStorageTypeProvider

An F# Azure Type Provider which can be used to explore Blob, Table and Queue Azure Storage assets and easily apply CRUD operations on them.
http://fsprojects.github.io/AzureStorageTypeProvider/
The Unlicense
84 stars 34 forks source link

not working for .NetCore #121

Open hotyes opened 5 years ago

hotyes commented 5 years ago

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

isaacabraham commented 5 years ago

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 commented 5 years ago

@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 commented 5 years ago

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 commented 5 years ago

@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 commented 5 years ago

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 commented 5 years ago

@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 commented 5 years ago

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 commented 4 years ago

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

isaacabraham commented 4 years ago

@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 commented 4 years ago

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

`

true /Library/Frameworks/Mono.framework/Versions/Current/Commands
<FscToolExe>fsharpc</FscToolExe>

`

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.