Portable class libraries are not recompiled when Windows Phone app is in ARM build configuration

I just got started with Lumia (formerly Nokia) Image Library. Due to some library limitations, it is necessary to use ARM or x86 configurations.

That's fine, but I have three portable class libraries that the application links to. Whenever I make changes to them, I have to change the build configuration back to any CPU and then back to ARM so that I can deploy that device.

If I don't change the build configuration on ANY CPU and back again, then the changes I made are not compiled. My build config for x86 looks like this:

enter image description here

So, seeing that the three PCLs only have ANY CPU build configuration, I created x86 for each, but the following error occurs to build:

The target 'x86' platform is not supported by one or more of the project objects.

Any idea how I can set up the project so that I don't have to build it twice for ARM and x86 build configurations?

+3


source to share


1 answer


First, you must enable the checkbox Build

in any project that you want to compile for the currently active platform. If not, this project will no longer compile, and if it links to any other project, it will refuse to use the cached versions sitting in the bin / obj folders; execution Clean

and Rebuild

will highlight which assemblies are referenced without being compiled in the first place.

Then think of platforms as configuration options that allow you to create all projects in a solution with one target architecture or others depending on where you are going to deploy / run them: this is especially useful when you have your own code projects that don't support AnyCPU

, and you want to test them in an emulator ( x86

) or an actual device ( ARM

). Also, don't be mistaken for the platform name with the actual architecture for which the project is being built; it gave the default architecture name, but you can change it to whatever you like (for example, Xamarin iOS uses iPhone

ARM to build for physical devices and iPhoneSimulator

for x86 simulators.



Finally, remember that once you add your own code projects / libraries to your project, you must stop using the architecture AnyCPU

in any project that references them; a project to be built for a specific platform ( x86

/ x64

or ARM

) can reference assemblies AnyCPU

, but not vice versa.

+2


source







All Articles