Xamarin ResolveLibraryProjectImports任务失败

时间:2018-03-06 22:15:21

标签: c# android xamarin xamarin.forms

在我的Xamarin.Forms应用程序中出现错误

我尝试过清洁,重建解决方案。没有改变任何事情。

我尝试在Android选项中禁用“使用快速部署”,但也没有改变任何内容。

尝试删除bin和obj文件夹,也没有任何影响。

导致此错误的原因是什么?如何解决?

以下完整错误:

Severity    Code    Description Project File    Line    Suppression State
Error       The "ResolveLibraryProjectImports" task failed unexpectedly.
System.IO.FileNotFoundException: Could not load assembly 'AB2goXamarin, Version=0.0.0.0, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile?
File name: 'AB2goXamarin.dll'
   at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters) in /Users/builder/data/lanes/5809/22d97e15/source/monodroid/external/xamarin-android/external/Java.Interop/src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/DirectoryAssemblyResolver.cs:line 229
   at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(String fullName) in /Users/builder/data/lanes/5809/22d97e15/source/monodroid/external/xamarin-android/external/Java.Interop/src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/DirectoryAssemblyResolver.cs:line 169
   at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Extract(DirectoryAssemblyResolver res, ICollection`1 jars, ICollection`1 resolvedResourceDirectories, ICollection`1 resolvedAssetDirectories, ICollection`1 resolvedEnvironments)
   at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() AB2goXamarin.Android            

谢谢,

1 个答案:

答案 0 :(得分:0)

我在安装MVVMLight后遇到了类似的错误,但在我将Visual Studio更新到最新版本(VS Enterprise v15.6.1)并从模板再次创建新项目后,它就消失了。