Error building player with wp8 plugin with ui

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

Which Unity version are you using? I’m pretty sure it was fixed at one point in 4.3.

Yeah… Still using 4.2.2f1. Haven’t tried 4.3 yet, cuz’ we had some problems exporting app for other platform (Android plugins)… Still waiting for 4.3.2f1. Thank you for now.

Hi Tautvydas Zilys,
I am using WWW classs for making rest call to my server, but i have an issue with Unity WP8 platform,

This is not working on Unity WP8, it sends the empty body.
however for the rest of the unity platforms it works fine…

Very very thanx for any help.

That’s strange, it should work properly. I suppose body is an array of bytes?

There was a bug that WWW, wasn’t setting headers - Content-Type application/x-www-form-urlencoded in 4.3 for WP8 and Windows Store Apps, maybe that’s your bug ? Try setting it yourself and see if it works for you.

Hi tomas thanx for reply,
Is there any other way to achieve for WP8… ?

Any help would be great.

Thank you.