0
Виконано

Bug for WIndows Phone compilation

Анонім 10 років тому оновлено Daedalus 10 років тому 6
When compiling for Windows Phone the project gets an error when your dungeon generator system has been added. Works well for other platforms than Windows Store or Windows Phone.
The error message is:

Error building Player: Exception: Error: type `System.Runtime.Serialization.ISerializable` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at SerializableDictionary`2.
Error: type `System.Runtime.Serialization.SerializationInfo` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void SerializableDictionary`2::.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 Assembly-CSharp.dll at System.Void SerializableDictionary`2::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext).
Error: method `System.Int32 System.Runtime.Serialization.SerializationInfo::GetInt32(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void SerializableDictionary`2::.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 Assembly-CSharp.dll at System.Void SerializableDictionary`2::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext).
Error: method `System.Object System.Runtime.Serialization.SerializationInfo::GetValue(System.String,System.Type)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void SerializableDictionary`2::.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 Assembly-CSharp.dll at System.Void SerializableDictionary`2::System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext).
Error: type `System.Runtime.Serialization.ISerializable` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void SerializableDictionary`2::System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext).
Error: type `System.Runtime.Serialization.SerializationInfo` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void SerializableDictionary`2::System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext).
Error: method `System.Void System.Runtime.Serialization.ISerializable::GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void SerializableDictionary`2::System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext).
Error: type `System.Runtime.Serialization.SerializationInfo` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void SerializableDictionary`2::System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext).
Error: method `System.Void System.Runtime.Serialization.SerializationInfo::AddValue(System.String,System.Int32)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void SerializableDictionary`2::System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext).
Error: type `System.Runtime.Serialization.SerializationInfo` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void SerializableDictionary`2::System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext).
Error: method `System.Void System.Runtime.Serialization.SerializationInfo::AddValue(System.String,System.Object,System.Type)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void SerializableDictionary`2::System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext).


Please help because I bought this stuff for Windows Phone development in the first place :(
Under review
We're checking this out and will let you know.
Hello,

we are investigating the issue. WP8 seems to lack serialization in its .Net libraries.
We were able to fix this for editor builds (i.e. when creating the dungeon before compiling) and we can give you the fix now if you need it.

The problem is with SerializedDictionary.cs.

For runtime use (i.e. creating the dungeon during play) we need to investigate further, as the error has no obvious fix. We have this as a top priority, tho, and will update you ASAP!

If you need to speed things up and you feel up to the task, here is something we're trying out: http://docs.unity3d.com/ScriptReference/ISerializationCallbackReceiver.OnBeforeSerialize.html

Will keep you updated. Thanks for the report.

Michele
That would be great! And thank you very much for the quick support.
you said you can give me the fix for editor creates dungeons. How do I get it? That would be a good solution for me at the moment, because I don't plan to use runtime creation of dungeons.