2

I'm trying to connect F# to SQL but when i build I keep getting this error


Warning 3 The primary reference "FSharp.Data.TypeProviders" could not be resolved because it has an indirect dependency on the .NET Framework assembly "FSharp.Core, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which has a higher version "4.3.0.0" than the version "4.0.0.0" in the current target framework. C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets 1360 9 ConsoleApplication33


Where can I find this version FSharp.Core 4.3.0.0? or is there any other solution?

pad
41.3k7 gold badges94 silver badges168 bronze badges
asked Feb 28, 2012 at 5:56

1 Answer 1

2

Are you targeting .NET Framework 4.5? If you target .NET Framework 4.5 and create a new project, Visual Studio automatically makes a reference to FSharp.Core 4.3.0.0 which belongs to F# 3.0.

Somehow, you mistakenly added a reference to FSharp.Core version in F# 2.0 and .NET Framework 4.0. Therefore, first check Target Framework in Project Properties and then add FSharp.Core 4.3.0.0 using Reference dialog (notice there are various FSharp.Core versions).

answered Feb 28, 2012 at 7:15
3
  • Incidentally, is it possible to use 4.3.0.0 in a project targeting .NET 4.0? I guess I should just try it, because it would be handy to have F# 3's LINQ support in a certain .NET 4 project I can think of... Commented Feb 28, 2012 at 19:27
  • @JoelMueller: It's like using FSharp.Core 4.0.0.0 with .NET 2.0/3.5. I don't think there is any problem with that. You should try and see :-) Commented Feb 28, 2012 at 19:34
  • @pad thank you very much -that was very helpfull.I guess I'll wait for the .NET Framework 4.5 beta release tomorrow then. Commented Feb 28, 2012 at 19:38

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.