ChrisMarinos / FSharpKoans

A simple, fun, and interactive way to learn the F# language through testing.
Other
1.28k stars 671 forks source link

Can't build on macOS with mono 5.0 #47

Closed mulchy closed 7 years ago

mulchy commented 7 years ago

Following the steps in the readme, I am able to install the dependencies via nuget restore, but msbuild fails with the following error:

FSC : error FS0193: The module/namespace 'System.Collections.Generic' from compilation unit 'mscorlib' did not contain the namespace, module or type 'IReadOnlyCollection`

I tried googling around, but didn't get very far. Do you have any ideas for why this is happening and how to fix it?

Full msbuild log:

Microsoft (R) Build Engine version 15.2.0.0 (xplat-2017-02/c2edfeb Thu May 18 13:58:03 EDT 2017)
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 6/7/2017 3:25:29 PM.
Project "/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
  Building solution configuration "Debug|Mixed Platforms".
Project "/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans.sln" (1) is building "/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans.Core/FsharpKoans.Core.fsproj" (2) on node 1 (default targets).
GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
CoreCompile:
Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files.
CopyFilesToOutputDirectory:
  FsharpKoans.Core -> /Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans.Core/bin/Debug/FSharpKoans.Core.dll
Done Building Project "/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans.Core/FsharpKoans.Core.fsproj" (default targets).
Project "/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans.sln" (1) is building "/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans/FSharpKoans.fsproj" (3) on node 1 (default targets).
ResolveAssemblyReferences:
  No way to resolve conflict between "System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". Choosing "System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily.
  Consider app.config remapping of assembly "System, Culture=neutral, PublicKeyToken=b77a5c561934e089" from Version "2.0.0.0" [/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll] to Version "4.0.0.0" [/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/4.0-api/System.dll] to solve conflict and get rid of warning.
  Consider app.config remapping of assembly "mscorlib, Culture=neutral, PublicKeyToken=b77a5c561934e089" from Version "2.0.0.0" [] to Version "4.0.0.0" [/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/4.0-api/mscorlib.dll] to solve conflict and get rid of warning.
  Consider app.config remapping of assembly "System.Xml, Culture=neutral, PublicKeyToken=b77a5c561934e089" from Version "2.0.0.0" [/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll] to Version "4.0.0.0" [/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/4.0-api/System.Xml.dll] to solve conflict and get rid of warning.
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): warning MSB3276: Found conflicts between different versions of the same dependent assembly. Please set the "AutoGenerateBindingRedirects" property to true in the project file. For more information, see http://go.microsoft.com/fwlink/?LinkId=294190. [/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans/FSharpKoans.fsproj]
GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
CoreCompile:
  /Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/fsharp/fsc.exe -o:obj/x86/Debug/FSharpKoans.exe
  -g
  --debug:full
  --noframework
  --define:DEBUG
  --define:TRACE
  --optimize-
  --tailcalls-
  --platform:anycpu
  -r:/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/gac/FSharp.Core/4.4.1.0__b03f5f7f11d50a3a/FSharp.Core.dll
  -r:/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans.Core/bin/Debug/FSharpKoans.Core.dll
  -r:/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/4.0-api/mscorlib.dll
  -r:/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/4.0-api/System.Core.dll
  -r:/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/4.0-api/System.dll
  -r:/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/4.0-api/System.Numerics.dll
  --target:exe
  --warn:3
  --warnaserror:76
  --fullpaths
  --flaterrors
  --highentropyva-
  /var/folders/1b/z43q2q1d747dfp1s6mt1z9j80000gn/T/.NETFramework,Version=v4.0.AssemblyAttributes.fs
  AboutAsserts.fs
  AboutLet.fs
  AboutFunctions.fs
  AboutTheOrderOfEvaluation.fs
  AboutUnit.fs
  AboutTuples.fs
  AboutStrings.fs
  AboutBranching.fs
  AboutLists.fs
  AboutPipelining.fs
  AboutArrays.fs
  AboutLooping.fs
  MoreAboutFunctions.fs
  AboutDotNetCollections.fs
  AboutTheStockExample.fs
  AboutRecordTypes.fs
  AboutOptionTypes.fs
  AboutDiscriminatedUnions.fs
  AboutModules.fs
  AboutClasses.fs
  PathToEnlightenment.fs

FSC : error FS0193: The module/namespace 'System.Collections.Generic' from compilation unit 'mscorlib' did not contain the namespace, module or type 'IReadOnlyCollection`1' [/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans/FSharpKoans.fsproj]

FSC : error FS0193: The module/namespace 'System.Collections.Generic' from compilation unit 'mscorlib' did not contain the namespace, module or type 'IReadOnlyCollection`1' [/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans/FSharpKoans.fsproj]

FSC : error FS0193: The module/namespace 'System.Collections.Generic' from compilation unit 'mscorlib' did not contain the namespace, module or type 'IReadOnlyCollection`1' [/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans/FSharpKoans.fsproj]

FSC : error FS0193: The module/namespace 'System.Collections.Generic' from compilation unit 'mscorlib' did not contain the namespace, module or type 'IReadOnlyCollection`1' [/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans/FSharpKoans.fsproj]

FSC : error FS0193: The module/namespace 'System.Collections.Generic' from compilation unit 'mscorlib' did not contain the namespace, module or type 'IReadOnlyCollection`1' [/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans/FSharpKoans.fsproj]

FSC : error FS0193: The module/namespace 'System.Collections.Generic' from compilation unit 'mscorlib' did not contain the namespace, module or type 'IReadOnlyCollection`1' [/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans/FSharpKoans.fsproj]

FSC : error FS0193: The module/namespace 'System.Collections.Generic' from compilation unit 'mscorlib' did not contain the namespace, module or type 'IReadOnlyCollection`1' [/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans/FSharpKoans.fsproj]

FSC : error FS0193: The module/namespace 'System.Collections.Generic' from compilation unit 'mscorlib' did not contain the namespace, module or type 'IReadOnlyCollection`1' [/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans/FSharpKoans.fsproj]
Done Building Project "/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans/FSharpKoans.fsproj" (default targets) -- FAILED.
Project "/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans.sln" (1) is building "/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans.Test/FSharpKoans.Test.fsproj" (4) on node 1 (default targets).
GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
CoreCompile:
  /Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/fsharp/fsc.exe -o:obj/Debug/FSharpKoans.Test.dll
  -g
  --debug:full
  --noframework
  --define:DEBUG
  --define:TRACE
  --doc:bin/Debug/FSharpKoans.Test.XML
  --optimize-
  --tailcalls-
  -r:/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/gac/FSharp.Core/4.4.1.0__b03f5f7f11d50a3a/FSharp.Core.dll
  -r:/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans.Core/bin/Debug/FSharpKoans.Core.dll
  -r:/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/4.0-api/mscorlib.dll
  -r:/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/packages/NUnit.2.5.10.11092/lib/nunit.framework.dll
  -r:/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/packages/NUnit.2.5.10.11092/lib/nunit.mocks.dll
  -r:/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/packages/NUnit.2.5.10.11092/lib/pnunit.framework.dll
  -r:/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/4.0-api/System.Core.dll
  -r:/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/4.0-api/System.dll
  -r:/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/4.0-api/System.Numerics.dll
  --target:library
  --warn:3
  --warnaserror:76
  --fullpaths
  --flaterrors
  --highentropyva-
  FindingKoans.fs
  RunningKoans.fs
  GettingTheWholeOutput.fs
  /var/folders/1b/z43q2q1d747dfp1s6mt1z9j80000gn/T/.NETFramework,Version=v4.0.AssemblyAttributes.fs

FSC : error FS0193: The module/namespace 'System.Collections.Generic' from compilation unit 'mscorlib' did not contain the namespace, module or type 'IReadOnlyCollection`1' [/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans.Test/FSharpKoans.Test.fsproj]

FSC : error FS0193: The module/namespace 'System.Collections.Generic' from compilation unit 'mscorlib' did not contain the namespace, module or type 'IReadOnlyCollection`1' [/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans.Test/FSharpKoans.Test.fsproj]
Done Building Project "/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans.Test/FSharpKoans.Test.fsproj" (default targets) -- FAILED.
Done Building Project "/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans.sln" (default targets) -- FAILED.

Build FAILED.

"/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans.sln" (default target) (1) ->
"/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans/FSharpKoans.fsproj" (default target) (3) ->
(ResolveAssemblyReferences target) -> 
  /Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): warning MSB3276: Found conflicts between different versions of the same dependent assembly. Please set the "AutoGenerateBindingRedirects" property to true in the project file. For more information, see http://go.microsoft.com/fwlink/?LinkId=294190. [/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans/FSharpKoans.fsproj]

"/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans.sln" (default target) (1) ->
"/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans/FSharpKoans.fsproj" (default target) (3) ->
(CoreCompile target) -> 
  FSC : error FS0193: The module/namespace 'System.Collections.Generic' from compilation unit 'mscorlib' did not contain the namespace, module or type 'IReadOnlyCollection`1' [/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans/FSharpKoans.fsproj]
  FSC : error FS0193: The module/namespace 'System.Collections.Generic' from compilation unit 'mscorlib' did not contain the namespace, module or type 'IReadOnlyCollection`1' [/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans/FSharpKoans.fsproj]
  FSC : error FS0193: The module/namespace 'System.Collections.Generic' from compilation unit 'mscorlib' did not contain the namespace, module or type 'IReadOnlyCollection`1' [/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans/FSharpKoans.fsproj]
  FSC : error FS0193: The module/namespace 'System.Collections.Generic' from compilation unit 'mscorlib' did not contain the namespace, module or type 'IReadOnlyCollection`1' [/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans/FSharpKoans.fsproj]
  FSC : error FS0193: The module/namespace 'System.Collections.Generic' from compilation unit 'mscorlib' did not contain the namespace, module or type 'IReadOnlyCollection`1' [/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans/FSharpKoans.fsproj]
  FSC : error FS0193: The module/namespace 'System.Collections.Generic' from compilation unit 'mscorlib' did not contain the namespace, module or type 'IReadOnlyCollection`1' [/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans/FSharpKoans.fsproj]
  FSC : error FS0193: The module/namespace 'System.Collections.Generic' from compilation unit 'mscorlib' did not contain the namespace, module or type 'IReadOnlyCollection`1' [/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans/FSharpKoans.fsproj]
  FSC : error FS0193: The module/namespace 'System.Collections.Generic' from compilation unit 'mscorlib' did not contain the namespace, module or type 'IReadOnlyCollection`1' [/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans/FSharpKoans.fsproj]

"/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans.sln" (default target) (1) ->
"/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans.Test/FSharpKoans.Test.fsproj" (default target) (4) ->
  FSC : error FS0193: The module/namespace 'System.Collections.Generic' from compilation unit 'mscorlib' did not contain the namespace, module or type 'IReadOnlyCollection`1' [/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans.Test/FSharpKoans.Test.fsproj]
  FSC : error FS0193: The module/namespace 'System.Collections.Generic' from compilation unit 'mscorlib' did not contain the namespace, module or type 'IReadOnlyCollection`1' [/Users/ryan.mulcahy/Code/f-sharp-playground/FSharpKoans/FSharpKoans.Test/FSharpKoans.Test.fsproj]

    1 Warning(s)
    10 Error(s)

Time Elapsed 00:00:08.05
dsyme commented 7 years ago

Could you check again after #48 please? thanks

dsyme commented 7 years ago

I've checked this builds on Linux after #48 - I will close this but please also check on OSX

mulchy commented 7 years ago

I will check when I get back to my computer tonight. Thanks!!

On Wed, Jun 7, 2017 at 6:33 PM Don Syme notifications@github.com wrote:

I've checked this builds on Linux after #48 https://github.com/ChrisMarinos/FSharpKoans/pull/48 - I will close this but please also check on OSX

— You are receiving this because you authored the thread.

Reply to this email directly, view it on GitHub https://github.com/ChrisMarinos/FSharpKoans/issues/47#issuecomment-306955503, or mute the thread https://github.com/notifications/unsubscribe-auth/AFiDhPotd8QGP3xkX-EdOIr8KhOpRnamks5sBzNfgaJpZM4NzPoX .

mulchy commented 7 years ago

Looks good to me!

Build succeeded.
    0 Warning(s)
    0 Error(s)