Reputation: 480
I created a console application and wrote some code but got stuck immediately as the compilation failed:
open System
printf "hello world"
Console.ReadKey() |> ignore
And here's what i got:
Error FS0193 The module/namespace 'System.Collections.Generic' from compilation unit 'mscorlib' did not contain the namespace, module or type 'IReadOnlyCollection`1'
I also tried a simpler version:
printf "Hey"
And got that:
An unhandled exception of type 'System.IO.FileNotFoundException' occurred in Unknown Module. Could not load file or assembly 'FSharp.Core, Version=4.4.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
I tried to repair Visual Studio through the Visual Studio Installer but it did not help.
Upvotes: 4
Views: 965
Reputation: 741
I solved this by deleting references to mscorlib
and rebuilding (VS2017)
Upvotes: 2
Reputation: 480
I just created a brand new solution and it worked perfectly fine... I still don't know what the problem was though...
Upvotes: 1