F# for Xamarin MacOS X:此工具集不支持 TargetFrameworkVersionv4.5.2 (ToolsVersion4.0)
F# for Xamarin MacOS X : TargetFrameworkVersionv4.5.2 not supported by this toolset (ToolsVersion4.0)
我一直在 VS2015 上使用 F#,但我在 MacOS X 10.11.3 上购买了我的第一台(新)iMAC 运行 并安装了 Xamarin 6.0(alpha 版本)。当我想编译一个在VS2015下没问题的文件时遇到了一些问题
我在编译时收到警告
TargetFrameworkVersionv4.5.2 not supported by this toolset (ToolsVersion4.0)
这是文件 Microsoft.Common.Targets
..../Library/Frameworks/Mono.Frameworks/Version/4.4.0/Lib/Mono/4.5/Microsoft.Common.Targets
并且在运行时出现错误
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, System.String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) [0x00000] in /private/tmp/source-mono-4.4.0/bockbuild-mono-4.4.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.IO/FileStream.cs:152
at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool)
at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost) [0x00065] in /private/tmp/source-mono-4.4.0/bockbuild-mono-4.4.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/external/referencesource/mscorlib/system/io/streamreader.cs:240
at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) [0x00000] in /private/tmp/source-mono-4.4.0/bockbuild-mono-4.4.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/external/referencesource/mscorlib/system/io/streamreader.cs:221
at System.IO.StreamReader..ctor (System.String path, Boolean detectEncodingFromByteOrderMarks) [0x00000] in /private/tmp/source-mono-4.4.0/bockbuild-mono-4.4.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/external/referencesource/mscorlib/system/io/streamreader.cs:202
at System.IO.StreamReader..ctor (System.String path) [0x00000] in /private/tmp/source-mono-4.4.0/bockbuild-mono-4.4.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/external/referencesource/mscorlib/system/io/streamreader.cs:182
at (wrapper remoting-invoke-with-check) System.IO.StreamReader:.ctor (string)
at System.IO.File.OpenText (System.String path) [0x00000] in /private/tmp/source-mono-4.4.0/bockbuild-mono-4.4.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.IO/File.cs:346
at System.IO.File.ReadAllLines (System.String path) [0x00000] in /private/tmp/source-mono-4.4.0/bockbuild-mono-4.4.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.IO/File.cs:515
at <StartupCode$Algo_Stanford>.$Knapsack_big.main@ () [0x0000d] in /Users/francois-guillaume.rideau/Documents/Learning-Fsharp/Algo Stanford/Algo Stanford/Knapsack_big.fs:20
我该怎么办?
谢谢
请将目标框架更改为 .NET 4.5,因为 Mono 4.x 尚不支持 4.5.2。
我一直在 VS2015 上使用 F#,但我在 MacOS X 10.11.3 上购买了我的第一台(新)iMAC 运行 并安装了 Xamarin 6.0(alpha 版本)。当我想编译一个在VS2015下没问题的文件时遇到了一些问题
我在编译时收到警告
TargetFrameworkVersionv4.5.2 not supported by this toolset (ToolsVersion4.0)
这是文件 Microsoft.Common.Targets
..../Library/Frameworks/Mono.Frameworks/Version/4.4.0/Lib/Mono/4.5/Microsoft.Common.Targets
并且在运行时出现错误
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, System.String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) [0x00000] in /private/tmp/source-mono-4.4.0/bockbuild-mono-4.4.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.IO/FileStream.cs:152
at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool)
at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost) [0x00065] in /private/tmp/source-mono-4.4.0/bockbuild-mono-4.4.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/external/referencesource/mscorlib/system/io/streamreader.cs:240
at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) [0x00000] in /private/tmp/source-mono-4.4.0/bockbuild-mono-4.4.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/external/referencesource/mscorlib/system/io/streamreader.cs:221
at System.IO.StreamReader..ctor (System.String path, Boolean detectEncodingFromByteOrderMarks) [0x00000] in /private/tmp/source-mono-4.4.0/bockbuild-mono-4.4.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/external/referencesource/mscorlib/system/io/streamreader.cs:202
at System.IO.StreamReader..ctor (System.String path) [0x00000] in /private/tmp/source-mono-4.4.0/bockbuild-mono-4.4.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/external/referencesource/mscorlib/system/io/streamreader.cs:182
at (wrapper remoting-invoke-with-check) System.IO.StreamReader:.ctor (string)
at System.IO.File.OpenText (System.String path) [0x00000] in /private/tmp/source-mono-4.4.0/bockbuild-mono-4.4.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.IO/File.cs:346
at System.IO.File.ReadAllLines (System.String path) [0x00000] in /private/tmp/source-mono-4.4.0/bockbuild-mono-4.4.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.IO/File.cs:515
at <StartupCode$Algo_Stanford>.$Knapsack_big.main@ () [0x0000d] in /Users/francois-guillaume.rideau/Documents/Learning-Fsharp/Algo Stanford/Algo Stanford/Knapsack_big.fs:20
我该怎么办?
谢谢
请将目标框架更改为 .NET 4.5,因为 Mono 4.x 尚不支持 4.5.2。