Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by pace15 · Jul 01, 2015 at 09:52 AM · serializationpluginsbuild errorwp8

[WP81] Serialization Weaver issue with Assembly-CSharp.dll

I was isolating a runtime data serialization error in a new smaller project while I ran on an issue of the Serialization Weaver.

 Error building Player: UnityException: Failed to run serialization weaver with command "Temp\StagingArea\Data\Managed\Assembly-CSharp.dll" -pdb -verbose -unity-engine=Temp\StagingArea\Data\Managed\UnityEngine.dll "Temp\StagingArea\TempSerializationWeaver".
 Symbols will be read from Temp\StagingArea\Data\Managed\UnityEngine.pdb
 Weaving assembly C:\dev\UnityProjects\TestProject\TestProject\Temp\StagingArea\Data\Managed\Assembly-CSharp.dll
 Symbols will be read from Temp\StagingArea\Data\Managed\Assembly-CSharp.pdb
 Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'ExternalLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
    � Mono.Cecil.BaseAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters)
    � Mono.Cecil.DefaultAssemblyResolver.Resolve(AssemblyNameReference name)
    � Mono.Cecil.MetadataResolver.Resolve(TypeReference type)
    � Unity.CecilTools.Extensions.ResolutionExtensions.Resolve[TReference,TDefinition](TReference reference, Func`2 resolve)
    � Unity.CecilTools.Extensions.TypeDefinitionExtensions.IsSubclassOf(TypeDefinition type, String baseTypeName)
    � Unity.Serialization.Weaver.MethodEmitterBase.WillUnitySerialize(FieldDefinition fieldDefinition)
    � Unity.Serialization.Weaver.SerializeMethodEmitter.ShouldProcess(FieldDefinition fieldDefinition)
    � System.Linq.Enumerable.<>c__DisplayClassf`1.<CombinePredicates>b__e(TSource x)
    � System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
    � Unity.Serialization.Weaver.MethodEmitterBase.EmitMethodBody()
    � Unity.Serialization.Weaver.SerializationWeaver.AddSerializeMethod()
    � Unity.Serialization.Weaver.SerializationWeaver.Weave()
    � usw.Weaver.WeaveAssembly(String assemblyPath, AssemblyDefinition unityEngineAssemblyDefinition)
    � usw.Weaver.Weave()
    � usw.Program.RunProgram(ConversionOptions options)
    � usw.Program.Main(String[] args)
 

  1. Importing both WP81 and standalone windows DLLs of my class library was successful

  2. It's only when building to Windows Store/Phone8.1 SDK that the error occurs.

My class library contains one class MyGenericClass:

 using System;
 
 namespace ExternalLib
 {
     [Serializable]
     public abstract class MyGenericClass<T>
     {
         public T m_Value;
     }
 }
 

My project class using the generic one looks like:

 using System;
 using ExternalLib;
 
 [Serializable]
 public class MyClass : MyGenericClass<int>
 {
     public int GetValue()
     {
         return m_Value;
     }
 }
 

Removing inheritance of MyGenericClass from MyClass prevents this issue from happening, but I still want to make it work... I was also suspecting Generic type classes could have anything to do with this but still, I'm already using this kind of generic classes and I know it's working.

What am I not doing correctly?

[1]: /storage/temp/49209-testproject.zip

[2]: /storage/temp/49211-plugins-importsettings.png

plugins-importsettings.png (58.5 kB)
testproject.zip (345.8 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by pace15 · Jul 24, 2015 at 03:30 PM

The answer from Unity: https://fogbugz.unity3d.com/default.asp?709358_jp9bhq80i4ob5h8f

I should not be using Serializable class in platform-specific plugins... Just avoid, at all cost, the use of [Serializable] tagged classes in plugins meant to be WP8.1 specific and simply move them to one that can be "Any" platform.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

Custom dll does not work with build -> works with editor - Unity 2019.4.38f 0 Answers

Best way to save plugin configurations 0 Answers

Windows phone 8 port failing during build 0 Answers

Help building with two conflicting plugins: GameAnalytics and Google Play Services 2 Answers

GoogleVR - Cardboard + Android build error 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges