Error When Building Windows Phone 8 Game

Hello,

When i build a copy of my game to my phone, I get the error,

Error building Player: Exception: Failed to run serialization weaver with command line “Temp/StagingArea/Data/Managed\Assembly-CSharp-firstpass.dll” -pdb -verbose -unity-engine=Temp/StagingArea/Data/Managed/UnityEngine.dll “Temp/StagingArea/TempSerializationWeaver”.[Temp/StagingArea/Data/Managed\Assembly-CSharp-firstpass.dll]
Symbols will be read from Temp/StagingArea/Data/Managed/UnityEngine.pdb
System.InvalidOperationException: Operation is not valid due to the current state of the object.
at Mono.Cecil.ModuleDefinition.ProcessDebugHeader()
at Mono.Cecil.ModuleReader.CreateModuleFrom(Image image, ReaderParameters parameters)
at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters)
at usw.Weaver.Weave()
at usw.Program.RunProgram(ConversionOptions options)
at usw.Program.Main(String args)

I have successfully built games on my phone before, but now it will not work for any project.

Any help would be great,

MileSplit

Try switching to a different build target (desktop, or web, or etc), doing a build, and then returning to the WP8 build target.

I managed to fix a similar build stop error which I encountered on 4.5.3f3 building for Windows 8 Store.

My issues was that I had to update code to not use incompatible interfaces with the Windows Store. With the removal from our code of the 3 unsupported Windows Phone and Windows 8 interfaces, the problem was completely eliminated. So I would recommend building with “Use Net Core” and double checking that you are only using compatible interfaces with the Windows Store/Windows Phone frameworks.

Complete error and more details on the forum at: http://forum.unity3d.com/threads/player-postprocess-exception-failed-to-run-serialization-weaver.214375/