2016-11-24 57 views
1

我想通過Xamarin爲Visual Studio製作一個F#應用程序。Xamarin for Visual Studio不會爲F#項目加載axml文件

每當我試圖打開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。

什麼想法?

+0

可能重複[Xamarin,Android。使用F#在VS2015中打開\ *。axml文件時出現異常(http://stackoverflow.com/questions/40070400/xamarin-android-exception-when-opening-axml-files-in-vs2015-using-f) – ashley

回答

相關問題