Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

unity3d compiled to windows phone8 failed,use protobuf-net

Discussion in 'Windows' started by dannisliang, Apr 5, 2014.

  1. dannisliang

    dannisliang

    Joined:
    Apr 5, 2014
    Posts:
    2
    1.download protobuf-net. site:http://protobuf-net.googlecode.com/files/protobuf-net r668.zip
    2. copy full/wp8/protobuf-net.dll into Unity Project directory Plugins
    3. Compile the Project to windows phone8

    What is the expected output?
    Internal compiler error. See the console log for more information. output was:
    Unhandled Exception: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.

    at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)

    at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0

    at Mono.CSharp.RootNamespace.ComputeNamespaces (System.Reflection.Assembly assembly, System.Type extensionType) [0x00000] in <filename unknown>:0

    at Mono.CSharp.RootNamespace.ComputeNamespace (Mono.CSharp.CompilerContext ctx, System.Type extensionType) [0x00000] in <filename unknown>:0

    at Mono.CSharp.GlobalRootNamespace.ComputeNamespaces (Mono.CSharp.CompilerContext ctx) [0x00000] in <filename unknown>:0

    at Mono.CSharp.Driver.LoadReferences () [0x00000] in <filename unknown>:0

    at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0

    at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0

    What version of the product are you using? On what operating system?
    Ver:r668
    Windows 8
    Visual Studio 2012
    unity3d 4.3.4f1
     
  2. dannisliang

    dannisliang

    Joined:
    Apr 5, 2014
    Posts:
    2
    this issue has been resolved.
     
  3. thy3s

    thy3s

    Joined:
    Feb 14, 2014
    Posts:
    7
    Hi

    I have the same problem, could you please tell me how did you fix it?
     
  4. kulesz

    kulesz

    Joined:
    Jul 1, 2012
    Posts:
    137
    I'd love to hear the fix too.
     
  5. Crichton333

    Crichton333

    Joined:
    May 4, 2014
    Posts:
    113
    Please post a link of some sort for the fix, or at least some info.
     
  6. seandanger

    seandanger

    Joined:
    Jun 13, 2012
    Posts:
    39
    I had the same issue, along with many "Type X doesn't exist in target framework" errors that would only occur during the Build command in the WP8 configuration. Here's what fixed it for me:

    In your Assets/Plugins folder, use the CoreOnly/Unity/protobuf-net.dll from the protobuf project download.

    Now, you need an Assets/Plugins/WP8 folder. In that folder, use the protobuf-net.dll file from CoreOnly/wp8. This was the crucial step for me. Once I added that folder and the WP8 plugin inside, I was able to build. According to this guide, when a Windows 8 build is made, it will use dlls from that folder. I guess not having it there caused it to fall back on the one not meant for Windows 8 deployment.

    If you still get ReflectionTypeLoadException before even building, I suggest trying some of the other protobuf-net.dll files in your Assets/Plugins folder, such as the portable one, or the net30 one.

    Good luck!