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

The provider does not work on .NET Core #111

Closed
psfinaki opened this issue Aug 30, 2018 · 4 comments
Closed

The provider does not work on .NET Core #111

psfinaki opened this issue Aug 30, 2018 · 4 comments

Comments

@psfinaki
Copy link
Contributor

I was struggling with extracting data from my Azure Table Storage using the .NET API and then discovered this wonderful type provider - thanks for creating it!

Now, the thing is that my app runs on .NET Core and this provider does not seem to work properly with that, at least out of the box.

I have created basic console apps for .NET Framework and .NET Core, installed there the nuget and added the following code:

open FSharp.Azure.StorageTypeProvider

type Azure = AzureTypeProvider<"proper connection string">

[<EntryPoint>]
let main argv = 
    let entities = Azure.Tables.TestTable.Query().Execute()
    0

.NET Framework app does the job, .NET Core app throws MissingMethodException:

System.MissingMethodException: 'Method not found: 'System.Collections.Generic.IEnumerable`1<!!0> 
Microsoft.WindowsAzure.Storage.Table.CloudTable.ExecuteQuery(Microsoft.WindowsAzure.Storage.Table.TableQuery`1<!!0>, 
Microsoft.WindowsAzure.Storage.Table.TableRequestOptions, Microsoft.WindowsAzure.Storage.OperationContext)'.'

Can I do something about it? Maybe add some binding redirect somewhere? Or some blacker magic?

@isaacabraham
Copy link
Collaborator

@psfinaki I've got some bad news - currently there's no support for .NET Core. This basically stems from three things:

  1. From what I understand, Type Providers on .NET Core don't yet support resolution of calls to third-party assemblies. In this case, this refers to the actual Azure Storage SDK, which the type provider "wraps around" to do all the heavy lifting. This is a blocker at the moment for porting to .NET Core.

  2. .NET Core-compatible versions of the Azure Storage SDK have removed many calls from the API that the non-.NET Core SDK had (mostly around non-async methods). Why they elected to do this I don't know but it will mean rewriting large chunks of the TP to support them.

  3. I've considered doing a "bare bones" TP that goes straight to the Azure REST API, avoiding dependencies completely, but this would be essentially a complete rewrite, but the need to find a file-based embedded JSON-to-F# deserializer.

So in summary - I also want a .NET Core version of the TP, but at the moment we're blocked. Sorry.

@isaacabraham
Copy link
Collaborator

Linking to #77

@psfinaki
Copy link
Contributor Author

@isaacabraham I see. Sounds quite fatal - and I get the reasoning. Thanks for quick response!

@isaacabraham
Copy link
Collaborator

@psfinaki hopefully it's not super fatal - it is on the roadmap to fix this :-) You can of course use the TP on full .NET in FSI etc. for exploration still (there's no FSI for .NET Core yet anyway).

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

2 participants