모든 긴 오류 메시지를 유감스럽게 생각합니다! 내 Xamarin에 문제가 있거나, Xamarin에서 FSI를 위반하는 Mono를 설치했는지 궁금합니다. Default .Net 런타임은 Mono 4.6.2입니다. Mono 4.8.0을 설치했지만 Xamarin은 4.6.2에서 실행됩니다.Mac 용 Xamarin Studio는 FSI에서 예외를 던집니다. -`~`가 코어 F # libs를로드하지 않는 것 같습니다.
FSI에서 System.Drawing 모듈을로드하지 않는다는 오류 메시지가 표시됩니다. 그리고 왜 SOURCE_DIRECTORY이 작동하지 않는 것일까 요? .fsx 파일에는 오류가 표시되지 않지만 FSI에로드하면 오류가 발생하지 않습니다.
Mac 용 Visual Studio도 설치되어 있습니다. 나는 F # (day 3)으로 시작하고 시스템 모듈을 열려고 시도한 것은 이번이 처음이다. 필자가 직접 작성하는 기본 기능은 FSI에서 평가됩니다. 나는 어딘가에 설치가 엉망이되어서 .Net, Xamarin 및 Mono를 제거하고 다시 설치해야하는지 궁금해하고 있습니다. Visual Studio에서 Xamarin을 방해 할 수 있습니까? FSI의 전체 코드 블록을로드
open System.Drawing
let bitmap = new Bitmap(32,32)
let path = __SOURCE_DIRECTORY__ + "/"
bitmap.Save (path + "large.png")
가 발생합니다 :
System.Exception: Generic Error [GDI+ status: GenericError]
at System.Drawing.GDIPlus.CheckStatus (System.Drawing.Status status) [0x0007a] in <1917aa1c39d94b1a91807b8cd9f03350>:0
at System.Drawing.Image.Save (System.String filename, System.Drawing.Imaging.ImageCodecInfo encoder, System.Drawing.Imaging.EncoderParameters encoderParams) [0x00043] in <1917aa1c39d94b1a91807b8cd9f03350>:0
at System.Drawing.Image.Save (System.String filename, System.Drawing.Imaging.ImageFormat format) [0x0004c] in <1917aa1c39d94b1a91807b8cd9f03350>:0
at System.Drawing.Image.Save (System.String filename) [0x00008] in <1917aa1c39d94b1a91807b8cd9f03350>:0
at (wrapper remoting-invoke-with-check) System.Drawing.Image:Save (string)
at <StartupCode$FSI_0004>[email protected]() [0x0003d] in <2545683d6122431b9ff3a69ce9ec460c>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in <8f2c484307284b51944a1a13a14c0266>:0
FSharp TV 소개 코스를 통과
나는 다음과 같은 오류
가 .fsx 파일에
F 번호가 를 실행 해요
로드 전용 SOURCE_DIRECTORY FSI에서 반환 :
가 발생합니다 : FSI
에 System.Drawing 보내기
Stopped due to error
System.Exception: Operation could not be completed due to earlier error
The type 'Bitmap' is not defined at 2,4
예외 :
그 라인을로드 올바른 경로아니기 때문에 이상한 691,363,210
val it : string = "/"
Stopped due to error
System.Exception: Operation could not be completed due to earlier error
The value, constructor, namespace or type 'Drawing' is not defined at 2,7
당신이 자 마린 스튜디오에서 F # 대화 형 패드를 시도 할 수 있을까요? 보기 -> 패드 -> F # 대화식입니다. – ashley
안녕하세요 애쉴리, 저는 실제로 Xamarin이 버그를 유발 한 모노 설치인지 확인하기 위해 삭제했습니다. F # Interactive는 모든 기능을 제거하기 전에 정상적으로 작동했습니다. 지금 VSCode를 사용하고 있습니다. 같은 버그. 그래도 다른 시스템 모듈을로드 할 수 있습니다 – fergus
흥미 롭습니다! FWIW, Xamarin 팀원은 문제없이 동일한 코드를 실행할 수있었습니다. VSCode에서도 실패한 것으로 보아서, 여러분의 컴퓨터에서 뭔가 이상하지 않을지 궁금합니다. [Mono 4.8 요구 사항] (https://developer.xamarin.com/releases/vs-mac/preview/vs-mac-preview1/#Side_by_Side_Installation_with_Xamarin_Studio) 이외의 VS Mac/Xamarin Studio 간섭에 대한 보고서를 보지 못했습니다. 그러나 경우에 대비하여 눈을 떼지 않을 것입니다. – ashley