Kaizer69
Kaizer69

Reputation: 432

PCL Project referencing LZ4Net is hitting a FileNotFound error on build, looking for LZ4cc

I'm hitting this error when I build my Xamarin Forms project. I added lz4net in the PCL and after that I started getting this error. I also got this error when I tried to use ILMerge to merge the dlls into one. Any help would be greatly appreciated.

Things I've done

  1. Refresh the references
  2. Delete contents of bin\debug and packages and restored packages
  3. updated android sdk

    Error Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'LZ4cc, Version=1.0.15.93, Culture=neutral, PublicKeyToken=62e1b5ec1eec9bdd'. Perhaps it doesn't exist in the Mono for Android profile? File name: 'LZ4cc.dll' at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters) at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(ICollection1 assemblies, AssemblyDefinition assembly, Boolean topLevel) at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(ICollection1 assemblies, AssemblyDefinition assembly, Boolean topLevel) at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(ICollection`1 assemblies, AssemblyDefinition assembly, Boolean topLevel) at Xamarin.Android.Tasks.ResolveAssemblies.Execute() PRide.AndroidApp C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets 1410

Upvotes: 1

Views: 315

Answers (1)

Kaizer69
Kaizer69

Reputation: 432

If anyone is curious I just needed to add LZ4 as a NuGet to the referencing project instead of directly referencing a dll

Upvotes: 1

Related Questions