Xamarin project opens up with error: Could not load file or assembly 'System.Collections.Immutable'

0

I'm working in a github cloned Xamarin project. When I open up the project it displays the following error:

Severity    Code    Description Project File    Line    Suppression State
Error       Could not load file or assembly 'System.Collections.Immutable, 
Version=1.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of 
its dependencies. The located assembly's manifest definition does not match 
the assembly reference. (Exception from HRESULT: 0x80131040)    ProjectName 
C:\Users\USER\.nuget\packages\refit\4.6.30\build\netstandard1.4\refit.targets   
29 

I've tried cleaning the project, deleting the bin/obj folders and I've cleared my nuget packages and restored. All of these solutions didn't work and when trying to rebuild the project it displays another error:

Severity    Code    Description Project File    Line    Suppression State
Error       The "ResolveLibraryProjectImports" task failed unexpectedly.
System.IO.FileNotFoundException: Could not load assembly 'ProjectName, 
Version=0.0.0.0, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist 
in the Mono for Android profile?
File name: 'ProjectName.dll'
at 

Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)
at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(String fullName)
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() ProjectName.Android         

I'm using Visual Studio Community 2017 version 15.8.8 and Xamarin.Forms 2.5.0.280555

The project that I'm working on works on other pc's from co-workers so I think it has to do with my VS installation. I tried to reinstall VS but this resulted in the same errors.

c#
android
xamarin
xamarin.forms
xamarin.android
asked on Stack Overflow Nov 12, 2018 by Shadow

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0