Description
Opened by jackfoxy on codeplex
12/18/14 daily build found this issue at runtime:
System.MissingMethodException : Method not fournd: SystemCollections.Generic IEqualityComparer'1
let checkForColumnHeaderDifference (expected: seq<string>) (actual: seq<string>) =
let expected = HashSet(expected, HashIdentity.StringIgnoreCase)
fails on "let expected = ..."
System.Collections.Generic.HashSet
(Having problems getting the debugger to run to the affected line (VM issue) ...so I can't currently tell you the values of "expected" and "actual" coming into the function.)
comments
jackfoxy wrote Dec 23, 2014 at 7:55 PM [x]
Update: fixed my VM, and there is nothing remarkable about the data coming into the function, simply a string sequence of length 13.latkin wrote Dec 23, 2014 at 10:20 PM [x]
Can you provide a ZIP of a repro solution?A few other questions -- What version of FSharp.Core are you using? What .NET version/profile are you targeting? What is HashIdentity.StringIgnoreCase?
jackfoxy wrote Dec 24, 2014 at 10:13 AM [x]
I researched this issue on a VM on my work machine. I won't have access again until 1/5/15. If this issue is still open then I will attempt a repro solution.
The original app was built on FSharp.Core, 4.3.1.0. I simply changed the Target F# runtime to F#4.0 within the project property page of VS 2015 preview and rebuilt the solution within VS.
A repro app "should" just consist of the following:
open System.Collections.Generic
let checkForColumnHeaderDifference (expected: seq) (actual: seq) =
let expected = HashSet(expected, HashIdentity.StringIgnoreCase)
expected
>>>>vladima wrote Dec 24, 2014 at 11:14 AM [x]
>>>>Given that FSharp.Core does not expose StringIgnoreCase on HashIdentity module I suspect that repro should include something else (that presumably defines this extrinsic extension property)
>>>>>jackfoxy wrote Dec 24, 2014 at 11:33 AM [x]
>>>>>@vladima right you are. I found this additional code:
````fsharp
module HashIdentity =
let ByProjection (f: 'A -> 'B) (eq: IEqualityComparer<'B>) : IEqualityComparer<'A> =
let hasher x = eq.GetHashCode(f x)
let equality x y = eq.Equals(f x, f y)
HashIdentity.FromFunctions hasher equality
let StringIgnoreCase =
HashIdentity.Structural<string>
|> ByProjection (fun (x: string) -> x.ToLower())
vladima wrote Dec 24, 2014 at 11:51 AM [x]
Is this code located in the same project or in different dll? For the latter case - what version of FSharp.Core is referenced in this assembly?
vladima wrote Dec 24, 2014 at 12:01 PM [x]
Ok, I have a guess: can you check if autogeneration of binding redirects is enabled in the repro project (http://msdn.microsoft.com/en-us/library/2fc472t2%28v=vs.110%29.aspx), enable it if it is disabled and check if the problem still exists
jackfoxy wrote Dec 24, 2014 at 2:20 PM [x]
All the code is in the same project, and in fact in the same file.There is no specified in the fsproj file, but there is true
Like I said above, I will not be able to work on the VM I have created for testing F#4.0 again until 1/5/15.
dsyme wrote Today at 1:23 AM [x]
It looks important to get to the bottom of this in case it is somehow related to the perf improvements for hash/compare/equality in F# 4.0 (though I think the likely solution is to add AutoGenerateBindingRedirects)
jackfoxy wrote Today at 5:00 PM [x]
My most recent research led me to suspect this issue involves the Target Framework .NET Portable Subset (.NET Framework 4.5, Windows 8) and Target F# runtime F# 4.0 (FSharp.Core, 3.7.4.0), but in attempting to set up a simple problem replication project that target framework is not available to me in VS2015, and the only target runtime available is F# 4.0 (FSharp.Core, 4.4.0.0).
As another issue in creating a replication project, my test environment somehow regressed to where I am failing on issue https://visualfsharp.codeplex.com/workitem/176, and I currently cannot replicate this reported issue. Fixing 176 should take precedence.