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?
1 Answer 1
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).
-
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...Joel Mueller– Joel Mueller02/28/2012 19:27:45Commented 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 :-)pad– pad02/28/2012 19:34:32Commented 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.user1237190– user123719002/28/2012 19:38:23Commented Feb 28, 2012 at 19:38