MiloszKrajewski / lz4net

LZ4 - ultra fast compression algorithm - for all .NET platforms
BSD 2-Clause "Simplified" License
369 stars 63 forks source link

FileNotFound error on build looking for LZ4cc #32

Open KaizerT opened 6 years ago

KaizerT commented 6 years ago

Hi,

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

ficzerepeti commented 5 years ago

Same issue here. Would be great to get some help. Thanks

MiloszKrajewski commented 5 years ago

Problem is quite complicated. At some point in time it stopped working on Mono while I was already porting it to netstandard (see: https://github.com/MiloszKrajewski/K4os.Compression.LZ4). So this library (lz4net) is only for people who already use it.

If you are new to it please switch to https://github.com/MiloszKrajewski/K4os.Compression.LZ4 asap.

ficzerepeti commented 5 years ago

We are one of those people already using it :) Meanwhile I've switched from ILMerge to Costura.Fody which is even nicer as I don't need to explicitly list the libraries to merge and works nicely with lz4.dll

MiloszKrajewski commented 5 years ago

ILMerge may not work at all, and this might be way beyond my technical abilities. You can try Costura.Fody and also LibZ