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

Heads up: What to do if a .NET SDK 2.0-style project file references a type provider like FSharp.Data #1058

Closed
dsyme opened this issue Jul 4, 2017 · 3 comments

Comments

@dsyme
Copy link
Contributor

dsyme commented Jul 4, 2017

Just a heads up about an issue dotnet/fsharp#3303 which may affect some users of FSharp.Data

With the imminent arrival of .NET SDK 2.0, people are starting to use new .NET SDK-style project files even for .NET Framework programming. A typical project file looks like this:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net461</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
    <Compile Include="Program.fs" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="FSharp.Data" Version="3.2.1" />
  </ItemGroup>
</Project>

That's it. For the majority of F# code nothing else (besides an install of the .NET SDK) will be required to compile your code. It's really a very nice and simple story and a lot of people will start converting their F# code to use this new project file format.

However, there is an issue where the F# compiler that ships as part of the .NET SDK doesn't yet correctly support type providers, and so if you use type providers in your project then you need to apply one of the workarounds as listed in dotnet/fsharp#3303. Basically right now you need force the project to use an install of an F# compiler running on .NET Framework/Mono. When that compiler is used instead, then type providers are supported. There are a couple of ways to achieve this as described in that issue.

@ovatsus ovatsus closed this as completed Apr 9, 2018
@patham9
Copy link

patham9 commented Jun 7, 2019

Why is this issue closed although it has not been resolved by now, June 2019?
Downloaded dotnet-sdk-3.0.100-preview5-011568-linux-x64.tar.gz and still the same TypeProvider issue arises. When will it be fixed properly without workarounds and hacks?

@dsyme
Copy link
Contributor Author

dsyme commented Sep 11, 2019

Why is this issue closed although it has not been resolved by now, June 2019? Downloaded dotnet-sdk-3.0.100-preview5-011568-linux-x64.tar.gz and still the same TypeProvider issue arises. When will it be fixed properly without workarounds and hacks?

Our understanding that this issue was fixed. Do you have a repro steps?

@Swoorup
Copy link

Swoorup commented Nov 2, 2019

Still having the same issue when using dotnet fsi. What fixes it? .net core 3.0 ?

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

4 participants