Hello all.
We managed to compile plugins for windows phone several times before, so we know the basic procedure, but now we have problem compiling the same library with UI elements (xaml). The idea is to have same library for Unity plugin and to invoke some common UI pages.
On the properties page on xaml file we can see, it’s compiled with “Page” build action. Apparantly building app from Unity can’t resolve pre-build elements for xaml ui elements.
How to reproduce step:
Add xaml (Windows phone Portrait Page) to your Real dll. Compile in VisualStudio. Copy to Unity and rebuild.
Build exception stack trace:
Error building Player: Exception: Failed to run assembly preprocessor with command line “Temp/StagingArea/Data/Managed\CompanyName.WP8.MyLib.dll” -injectCtor -assemblyPath “Temp/StagingArea” -pdb.[Temp/StagingArea/Data/Managed\CompanyName.WP8.MyLib.dll]
No symbols for Temp/StagingArea/Data/Managed\WP8.MyLib.dll
Injecting ctor
Error while in assembly preprocessor Temp/StagingArea/Data/Managed\CompanyName.WP8.MyLib.dll
Failed to resolve assembly: ‘Microsoft.Phone, Version=8.0.0.0, Culture=neutral, PublicKeyToken=24eec0d8c86cda1e’
at Mono.Cecil.BaseAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters)
at Mono.Cecil.DefaultAssemblyResolver.Resolve(AssemblyNameReference name)
at Mono.Cecil.MetadataResolver.Resolve(TypeReference type)
at Mono.Cecil.TypeReference.Resolve()
at AssemblyPreprocessor.Utils.IsFromNamespace(TypeDefinition definition, String namezpace)
at AssemblyPreprocessor.ConstructorInjector.ShouldInject(TypeDefinition typeDefinition)
at AssemblyPreprocessor.ConstructorInjector.InjectConstructorsForTypesIn(ModuleDefinition moduleDefinition)
at AssemblyPreprocessor.Program.Main(String[ ] args)
Of course, the alternative should be to use different libs, or to write code without using xaml framework…
Thank you.
Dejan