用于Visual Studio的Xamarin不会为F#项目加载axml文件

时间:2016-11-24 13:27:23

标签: visual-studio xamarin f#

我正在尝试通过Xamarin为Visual Studio制作一个F#应用程序。

每当我尝试打开axml文件时,我都会收到错误“无法加载布局”

enter image description here

 System.NullReferenceException: Object reference not set to an instance of an object.
   at Xamarin.VisualStudio.Android.MonoAndroidDesignerInterface.VisualStudioCodeModelBridge.get_EnclosingProject() in C:\data\lanes\3513\872717c9\source\xamarinvs\src\Core\VisualStudio.Android\Designer\MonoAndroidDesignerInterface.cs:line 180
   at Xamarin.AndroidDesigner.CodeInteractions.CodeModelBridge.<GetCompilationAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Xamarin.AndroidDesigner.CodeInteractions.CodeModelBridge.<GetDesignerResourceEntries>d__27.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Xamarin.AndroidDesigner.DesignerProject.<UpdateDesignerResourceIds>d__175.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Xamarin.AndroidDesigner.DesignerProject.<EnsureLoaded>d__139.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Xamarin.AndroidDesigner.AndroidRenderSession.<InitSession>d__105.MoveNext()

有趣的是,如果我制作基于F#的项目,这只是一个问题。如果我做了一个C#项目,那么它会毫无问题地加载axml。

任何想法?

1 个答案:

答案 0 :(得分:0)

这是一个已经确认但尚未修复的错误。

https://bugzilla.xamarin.com/show_bug.cgi?id=44956