"ResolveLibraryProjectImports"任务意外失败 [英] The "ResolveLibraryProjectImports" task failed unexpectedly

查看:191
本文介绍了"ResolveLibraryProjectImports"任务意外失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个基于MvvmCross的Xamarin项目.该项目适用于iOS和Android.我在Visual Studio 15中打开了这个项目.我遇到了一些错误,这些错误很快就解决了.有些错误会卡住,即使在Google和Stackoverflow上搜索后,我也无法解决.我已经尝试了Stackoverflow上发现的每个方法,但是仍然存在所有剩余的错误. 该项目使用的是诸如RestSharp和BoxApi.V2之类的第三方库(更多)

I have a Xamarin project, which is based on MvvmCross. The project is for both iOS and Android. I opened this project in Visual Studio 15. I got some errors, which I solved in no time. There are some errors, which are stuck and I couldn't solve them even after searching on Google and on Stackoverflow. I have tried each and every method found on Stackoverflow, but still all remaining errors are there. This project is using 3rd party libraries like RestSharp and BoxApi.V2 (few more)

我在下面发布我的错误日志.

I am posting my error log below.

Severity    Code    Description Project File    Line    Suppression State
Error       The "ResolveLibraryProjectImports" task failed unexpectedly.
System.IO.FileNotFoundException: Could not load assembly 'RestSharp(Android), Version=0.0.0.0, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile?
File name: 'RestSharp(Android).dll'
   at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)
   at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(String fullName, ReaderParameters parameters)
   at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(String fullName)
   at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.GetAssembly(String fileName)
   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() BoxApi.V2 (Android)

此错误对于此解决方案中包含的所有项目都重复.因此,我多次遇到此错误.

This error is repeating for all projects included in this solution. So I am getting this error multiple times.

我还想补充一点,该项目以前是基于MAC构建的,并且我使用的是Windows,这是否带来一些兼容性或跨OS问题? 我检查了所有程序集引用,并且一切正常.

I also want to add that the project was previously built on MAC and I am using windows, does this make some compatibility or cross OS issue? I have checked all assembly references and all are working fine.

推荐答案

我刚在Visual Studio 2017中使用全新的Xamarin.Forms应用程序进行了此操作.

I've literally just had this with a brand new Xamarin.Forms application in Visual Studio 2017.

根本原因似乎是我让VS2017在默认位置'C:\ Users \ Dave \ Documents \ Visual Studio 2017 \ Projects'中创建项目,这导致多个文件之一现在具有路径太久了.

The root cause appears to be that I let VS2017 create the project in it's default location 'C:\Users\Dave\Documents\Visual Studio 2017\Projects' and this has resulted in one of more files now having a path which it too long.

我将解决方案移到了D驱动器的根目录,它的构建没有任何问题.

I moved the solution to the root of my D drive and it builds without any problem.

这篇关于"ResolveLibraryProjectImports"任务意外失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆