Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Need clarification regarding Microsoft.FSharp.Data.TypeProviders

Tags:

f#

We have a project build with F# 3.1 using Microsoft.FSharp.Data.TypeProviders. Now we are trying to build this project with VS2015 and we have the problems with this part of F#. For example, when I am trying to install it using Nuget it requires F# 3.1. I use this guide and it looks outdated.

So I will be thankful for answers on my questions:

  1. What part of F# language Microsoft.FSharp.Data.TypeProviders belongs to? It is F# core library or it is one of external libraries? Who is responsible for this library? Where can I find the bug tracker for this part of F# ecosystem?

  2. Is there anybody who trying to use this tutorial to build F# application in VS2015? Do you have a problems like me? Or all is working fine?

  3. What is the current state of Microsoft.FSharp.TypeProviders? Is it outdated and all what I need is to wait some time when the library will be adopted to F# 4.0 and VS2015. Or do I need to switch to other DB-access library?

Here is full description to reproduce error:

  • New Project - F# - Console Application (net 4.6)
  • NuGet - Install Data.TypeProviders. packages.config:

    <?xml version="1.0" encoding="utf-8"?>
      <packages>
       <package id="FSharp.Core.3" version="0.0.2" targetFramework="net46" />
       <package id="FSharp.Data.TypeProviders" version="0.0.1" targetFramework="net46" />
      </packages>
    
  • To program.fs add the lines:

    module Test
       open Microsoft.FSharp.Data.TypeProviders
       type internal DB = SqlDataConnection<"Data Source=MyServer;Initial Catalog=MyDB;Integrated Security=SSPI;">
    

Here is an error message:

The .NET SDK 4.0 or 4.5 tools can not be found

enter image description here

like image 588
ceth Avatar asked Dec 19 '22 01:12

ceth


1 Answers

Some more historical background:

1.What part of F# language Microsoft.FSharp.Data.TypeProviders belongs to? It is F# core library or it is one of external libraries? Who is responsible for this library? Where can I find the bug tracker for this part of F# ecosystem?

It's not part of the core runtime, i.e. you can be a happy and productive F# dev without ever interacting with it. It was created by Microsoft and shipped with F# 3.0/VS 2012 as a set of in-the-box type providers for common Msft data stacks. Type providers as a language feature were added in the same release, so this library was a bit of a showcase of what could be done. FS.D.TP is not actively maintained at the moment. Original version 4.3.0.0 is still shipped in the box with VS 2013 and VS 2015, but no changes have been made since the VS 2012 release. Source is available here and you are welcome to file bugs in that repo, too.

In principle the library be taken over as a community project and maintained/updated from there as a nuget package. Nothing is really preventing this. However having the library in the box with Msft signature and support is very important to a lot of enterprise customers still. So it persists in this sort of limbo state where it's in the box but not updated.

3.What is the current state of Microsoft.FSharp.TypeProviders? Is it outdated and all what I need is to wait some time when the library will be adopted to F# 4.0 and VS2015. Or do I need to switch to other DB-access library?

Some of this is answered above. The library should still be perfectly functional with F# 3.1 or F# 4.0, provided you have all of the required dependencies. In particular, you need the .NET 4.0 or 4.5 SDK installed (you can get Win8/.NET 4.5 SDK here) because the TPs rely on various executable codegen tools (sqlmetal.exe, svutil.exe) that come along therewith.

like image 118
latkin Avatar answered Mar 16 '23 13:03

latkin