Description
Using either FSharpProjectFileInfo.Parse
or checker.GetProjectOptionsFromProjectFile
Causes a Microsoft.Build.Exceptions.InvalidProjectFileException
to be thrown:
Microsoft.Build.Exceptions.InvalidProjectFileException: /Users/dave/Projects/sv_classic_ios/sv_classic_ios/sv_classic_ios.fsproj: /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.MonoTouch.FSharp.targets: Project file could not be imported, it was being imported by /Users/dave/Projects/sv_classic_ios/sv_classic_ios/sv_classic_ios.fsproj: /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.MonoTouch.FSharp.targets could not import "$(FSharpTargets)"
at Microsoft.FSharp.Compiler.SourceCodeServices.FSharpProjectFileInfo..ctor (System.String fsprojFileName, Microsoft.FSharp.Core.FSharpOption1 properties, Microsoft.FSharp.Core.FSharpOption
1 enableLogging) [0x000c2] in :0
at Microsoft.FSharp.Compiler.SourceCodeServices.FSharpProjectFileInfo.Parse (System.String fsprojFileName, Microsoft.FSharp.Core.FSharpOption1 properties, Microsoft.FSharp.Core.FSharpOption
1 enableLogging) [0x00001] in :0
at <StartupCode$FSharp-CompilerBinding>.$LanguageService+GetProjectCheckerOptions@328.Invoke (Microsoft.FSharp.Core.Unit unitVar0) [0x00082] in /Users/dave/code/xamarin/monodevelop/main/external/fsharpbinding/FSharp.CompilerBinding/LanguageService.fs:336
at FSharp.CompilerBinding.LanguageService.GetProjectCheckerOptions (System.String projFilename, Microsoft.FSharp.Core.FSharpOption1 properties) [0x00029] in /Users/dave/code/xamarin/monodevelop/main/external/fsharpbinding/FSharp.CompilerBinding/LanguageService.fs:328 at FSharp.CompilerBinding.LanguageService.GetCheckerOptions (System.String fileName, System.String projFilename, System.String source) [0x00036] in /Users/dave/code/xamarin/monodevelop/main/external/fsharpbinding/FSharp.CompilerBinding/LanguageService.fs:290 at <StartupCode$FSharp-CompilerBinding>.$LanguageService+ParseAndCheckFileInProject@351.Invoke (Microsoft.FSharp.Core.Unit unitVar) [0x00000] in /Users/dave/code/xamarin/monodevelop/main/external/fsharpbinding/FSharp.CompilerBinding/LanguageService.fs:351 at Microsoft.FSharp.Control.AsyncBuilderImpl+callA@805[FSharp.CompilerBinding.ParseAndCheckResults,Microsoft.FSharp.Core.Unit].Invoke (Microsoft.FSharp.Control.AsyncParams
1 args) [0x0002b] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr2/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/fsharp-fsharp-1f79c04/src/fsharp/FSharp.Core/control.fs:809