Error to compile on windows phone plataform

Hi! I’m trying to compile a new project con WP8 plataform. I have the Unity Pro and WP SDK. Other projects compile succefully, but when I try to compile this project the console throw this error.

Error building Player: Exception: Error: type System.Runtime.Serialization.SerializationInfo doesn’t exist in target framework. It is referenced from ICSharpCode.SharpZipLib.dll at System.Void ICSharpCode.SharpZipLib.SharpZipBaseException::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext).
Error: type System.Runtime.Serialization.SerializationInfo doesn’t exist in target framework. It is referenced from ICSharpCode.SharpZipLib.dll at System.Void ICSharpCode.SharpZipLib.SharpZipBaseException::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext).
Error: method System.Void System.ApplicationException::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) doesn’t exist in target framework. It is referenced from ICSharpCode.SharpZipLib.dll at System.Void ICSharpCode.SharpZipLib.SharpZipBaseException::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext).
Error: type System.Runtime.Serialization.SerializationInfo doesn’t exist in target framework. It is referenced from ICSharpCode.SharpZipLib.dll at System.Void ICSharpCode.SharpZipLib.BZip2.BZip2Exception::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext).
Error: type System.Runtime.Serialization.SerializationInfo doesn’t exist in target framework. It is referenced from ICSharpCode.SharpZipLib.dll at System.Void ICSharpCode.SharpZipLib.BZip2.BZip2Exception::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext).
Error: type System.Security.Cryptography.RijndaelManaged doesn’t exist in target framework. It is referenced from ICSharpCode.SharpZipLib.dll at System.Void ICSharpCode.SharpZipLib.Encryption.ZipAESTransform::.ctor(System.String,System.Byte,System.Int32,System.Boolean).
Error: type System.Security.Cryptography.RijndaelManaged doesn’t exist in target framework. It is referenced from ICSharpCode.SharpZipLib.dll at System.Void ICSharpCode.SharpZipLib.Encryption.ZipAESTransform::.ctor(System.String,System.Byte,System.Int32,System.Boolean).
Error: method System.Void System.Security.Cryptography.RijndaelManaged::.ctor() doesn’t exist in target framework. It is referenced from ICSharpCode.SharpZipLib.dll at System.Void ICSharpCode.SharpZipLib.Encryption.ZipAESTransform::.ctor(System.String,System.Byte,System.Int32,System.Boolean).
Error: type System.Security.Cryptography.CipherMode doesn’t exist in target framework. It is referenced from ICSharpCode.SharpZipLib.dll at System.Void ICSharpCode.SharpZipLib.Encryption.ZipAESTransform::.ctor(System.String,System.Byte,System.Int32,System.Boolean).
Error: method System.Void System.Security.Cryptography.SymmetricAlgorithm::set_Mode(System.Security.Cryptography.CipherMode) doesn’t exist in target framework. It is referenced from ICSharpCode.SharpZipLib.dll at System.Void ICSharpCode.SharpZipLib.Encryption.ZipAESTransform::.ctor(System.String,System.Byte,System.Int32,System.Boolean).
Error: type System.Runtime.Serialization.SerializationInfo doesn’t exist in target framework. It is referenced from ICSharpCode.SharpZipLib.dll at System.Void ICSharpCode.SharpZipLib.GZip.GZipException::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext).
Error: type System.Runtime.Serialization.SerializationInfo doesn’t exist in target framework. It is referenced from ICSharpCode.SharpZipLib.dll at System.Void ICSharpCode.SharpZipLib.GZip.GZipException::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext).
Error: type System.Runtime.Serialization.SerializationInfo doesn’t exist in target framework. It is referenced from ICSharpCode.SharpZipLib.dll at System.Void ICSharpCode.SharpZipLib.LZW.LzwException::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext).
Error: type System.Runtime.Serialization.SerializationInfo doesn’t exist in target framework. It is referenced from ICSharpCode.SharpZipLib.dll at System.Void ICSharpCode.SharpZipLib.LZW.LzwException::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext).
Error: type System.Runtime.Serialization.SerializationInfo doesn’t exist in target framework. It is referenced from ICSharpCode.SharpZipLib.dll at System.Void ICSharpCode.SharpZipLib.Tar.TarException::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext).
Error: type System.Runtime.Serialization.SerializationInfo doesn’t exist in target framework. It is referenced from ICSharpCode.SharpZipLib.dll at System.Void ICSharpCode.SharpZipLib.Tar.TarException::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext).
Error: type System.Runtime.Serialization.SerializationInfo doesn’t exist in target framework. It is referenced from ICSharpCode.SharpZipLib.dll at System.Void ICSharpCode.SharpZipLib.Tar.InvalidHeaderException::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext).
Error: type System.Runtime.Serialization.SerializationInfo doesn’t exist in target framework. It is referenced from ICSharpCode.SharpZipLib.dll at System.Void ICSharpCode.SharpZipLib.Tar.InvalidHeaderException::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext).
Error: method System.Text.Encoding System.Text.Encoding::get_ASCII() doesn’t exist in target framework. It is referenced from ICSharpCode.SharpZipLib.dll at System.Void ICSharpCode.SharpZipLib.Tar.TarArchive::ExtractEntry(System.String,ICSharpCode.SharpZipLib.Tar.TarEntry).
Error: method System.Text.Encoding System.Text.Encoding::get_ASCII() doesn’t exist in target framework. It is referenced from ICSharpCode.SharpZipLib.dll at System.Void ICSharpCode.SharpZipLib.Tar.TarArchive::WriteEntryCore(ICSharpCode.SharpZipLib.Tar.TarEntry,System.Boolean).
Error: method System.String System.Environment::get_UserName() doesn’t exist in target framework. It is referenced from ICSharpCode.SharpZipLib.dll at System.Void ICSharpCode.SharpZipLib.Tar.TarHeader::set_UserName(System.String).
Error: method System.Void System.IO.File::SetLastWriteTime(System.String,System.DateTime) doesn’t exist in target framework. It is referenced from ICSharpCode.SharpZipLib.dll at System.Void ICSharpCode.SharpZipLib.Zip.FastZip::ExtractFileEntry(ICSharpCode.SharpZipLib.Zip.ZipEntry,System.String).
Error: method System.Text.Encoding System.Text.Encoding::GetEncoding(System.Int32) doesn’t exist in target framework. It is referenced from ICSharpCode.SharpZipLib.dll at System.String ICSharpCode.SharpZipLib.Zip.ZipConstants::ConvertToString(System.Byte,System.Int32).
Error: method System.Text.Encoding System.Text.Encoding::GetEncoding(System.Int32) doesn’t exist in target framework. It is referenced from ICSharpCode.SharpZipLib.dll at System.Byte ICSharpCode.SharpZipLib.Zip.ZipConstants::ConvertToArray(System.String).
Error: method System.Int32 System.Globalization.TextInfo::get_OEMCodePage() doesn’t exist in target framework. It is referenced from ICSharpCode.SharpZipLib.dll at System.Void ICSharpCode.SharpZipLib.Zip.ZipConstants::.cctor().
Error: method System.DateTime System.IO.FileSystemInfo::get_CreationTimeUtc() doesn’t exist in target framework. It is referenced from ICSharpCode.SharpZipLib.dll at ICSharpCode.SharpZipLib.Zip.ZipEntry ICSharpCode.SharpZipLib.Zip.ZipEntryFactory::MakeFileEntry(System.String,System.Boolean).
Error: method System.DateTime System.IO.FileSystemInfo::get_LastAccessTimeUtc() doesn’t exist in target framework. It is referenced from ICSharpCode.SharpZipLib.dll at ICSharpCode.SharpZipLib.Zip.ZipEntry ICSharpCode.SharpZipLib.Zip.ZipEntryFactory::MakeFileEntry(System.String,System.Boolean).
Error: method System.DateTime System.IO.FileSystemInfo::get_LastWriteTimeUtc() doesn’t exist in target framework. It is referenced from ICSharpCode.SharpZipLib.dll at ICSharpCode.SharpZipLib.Zip.ZipEntry ICSharpCode.SharpZipLib.Zip.ZipEntryFactory::MakeFileEntry(System.String,System.Boolean).
Error: method System.DateTime System.IO.FileSystemInfo::get_CreationTimeUtc() doesn’t exist in target framework. It is referenced from ICSharpCode.SharpZipLib.dll at ICSharpCode.SharpZipLib.Zip.ZipEntry ICSharpCode.SharpZipLib.Zip.ZipEntryFactory::MakeDirectoryEntry(System.String,System.Boolean).
Error: method System.DateTime System.IO.FileSystemInfo::get_LastAccessTimeUtc() doesn’t exist in target framework. It is referenced from ICSharpCode.SharpZipLib.dll at ICSharpCode.SharpZipLib.Zip.ZipEntry ICSharpCode.SharpZipLib.Zip.ZipEntryFactory::MakeDirectoryEntry(System.String,System.Boolean).
Error: method System.DateTime System.IO.FileSystemInfo::get_LastWriteTimeUtc() doesn’t exist in target framework. It is referenced from ICSharpCode.SharpZipLib.dll at ICSharpCode.SharpZipLib.Zip.ZipEntry ICSharpCode.SharpZipLib.Zip.ZipEntryFactory::MakeDirectoryEntry(System.String,System.Boolean).
Error: type System.Runtime.Serialization.SerializationInfo doesn’t exist in target framework. It is referenced from ICSharpCode.SharpZipLib.dll at System.Void ICSharpCode.SharpZipLib.Zip.ZipException::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext).
Error: type System.Runtime.Serialization.SerializationInfo doesn’t exist in target framework. It is referenced from ICSharpCode.SharpZipLib.dll at System.Void ICSharpCode.SharpZipLib.Zip.ZipException::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext).
Error: method System.Int32 System.String::Compare(System.String,System.String,System.Boolean,System.Globalization.CultureInfo) doesn’t exist in target framework. It is referenced from ICSharpCode.SharpZipLib.dll at System.Int32 ICSharpCode.SharpZipLib.Zip.ZipFile::FindEntry(System.String,System.Boolean).
Error: method System.Text.Encoding System.Text.Encoding::get_ASCII() doesn’t exist in target framework. It is referenced from ICSharpCode.SharpZipLib.dll at System.Int32 ICSharpCode.SharpZipLib.Zip.ZipFile::WriteCentralDirectoryHeader(ICSharpCode.SharpZipLib.Zip.ZipEntry).

Can somebody help me?

Thanks!

In my Unity project, I had ICSharpZipLib DLL in Plugin folder. I got the same problem. Actually I still cannot find out the cause of this problem. But I have a workaround to perhaps fix this problem. I added ICSharpZipLib DLL and wrote all functions that do the compression/extraction in my Visual C# project (which is created by Unity when you build the game for WP8 platform). Then I created some delegates that I can call those functions inside my Unity project. So I can remove ICSharpZipLib DLL from my Unity Project. Hope this help.