The “ResolveLibraryProjectImports” task failed unexpectedly

后端 未结 24 1965
醉话见心
醉话见心 2021-01-01 09:48

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, wh

相关标签:
24条回答
  • 2021-01-01 10:02

    I have Faced this issue a thousand times its actually a very simple thing when you create a new project visual studio creates it in C:Drive in its default folder all you have to do is move your project out in some other Drive Like D:, E: whatever just make sure to keep it in the root of your Drive i.e. If you move it in D: Then place it like this D/Project/solutionFile

    0 讨论(0)
  • 2021-01-01 10:02

    I encountered the same issue and none of the solutions above worked. After noticing and error on the list regarding Cryptography I knew it had to be related to FIPS being enabled (required by a VPN client)

    By disabling FIPS and restarting Visual Studio the issue was resolved.

    0 讨论(0)
  • 2021-01-01 10:03

    In my case, this issue came with another related to my xaml.
    I had to solved the second in order this error dissapear. I clean up the class with a new default content and then clean all projects and solution. By last, close visual studio, open it , run the project and It works know .-.

    0 讨论(0)
  • 2021-01-01 10:05

    Well for me the problem was in my xaml file...

    Somehow while setting the Layout bounds i used '.' as a separator instead of ','

    e.g

    AbsoluteLayout.LayoutBounds="0.5.0.3,1,0.3" should have been AbsoluteLayout.LayoutBounds="0.5,0.3,1,0.3"

    Hence changing the '.' to ',' solved the problem

    0 讨论(0)
  • 2021-01-01 10:05

    We have encountered this too, it appears to be some type of race condition when building multiple projects and a very deep/complex dependency tree (our example has over 100 projects).

    The only way we've been able to resolve this (beyond continually rebuilding) is to disable Visual Studio 2017's Parallel Build Abilities (Tools->Options->Projects and Solutions->Build and Run->"1" Maximum number of parallel project builds).

    The problem appears to be in ResolveLibraryProjectImports.cs (https://github.com/xamarin/xamarin-android/blob/93ddf96f86710ad848d5189858567dd7fe964579/src/Xamarin.Android.Build.Tasks/Tasks/ResolveLibraryProjectImports.cs) there is most likely a race condition with their logic to shorten up the file names.

    There are zero tests around this which means there is most likely some dodgy code.

    I am going to attempt to dig more and get an issue opened up on GitHub but finding a reliable repo is probably going to be very difficult.

    0 讨论(0)
  • 2021-01-01 10:05

    Not sure if it will help anyone of you. For my case, I comment the erroneous class (eg. those with missing references), and it will start to pick up everything and build again.

    0 讨论(0)
提交回复
热议问题