64 bit application development

Topics: Prism v4 - WPF 4
Apr 10, 2012 at 10:45 AM

Hi,

To use the prism 4.0 in 64 bit application development do I need to rebuild the source code for x64 platform?

I want to use 64 bit native assemblies.

Regards, Rajendra.

Developer
Apr 10, 2012 at 5:47 PM

Hi,

Based on my understanding, you should be able to use the Prism library's assemblies (that is, the .dll files) as out of the box for both x86 and x64 platforms. From our side, we have used the Prism library in both Windows 7 x86 and Windows 7 x64 without any inconvenience.

Regarding the x64 native assemblies, as far as I know you shouldn't experience any incompatibility issue between them and Prism.

You can find more information about this in the following article on MSDN:

Regards,

Damian Cherubini
http://blogs.southworks.net/dcherubini

Apr 11, 2012 at 4:35 AM

Hi Damian,

So, do you want to say that the prism assemblies are targeting "Any CPU" platform setting?

Regards, Rajendra.

Developer
Apr 11, 2012 at 4:57 PM

Hi Rajendra,

That is right. Based on my understanding, the Prism assemblies have their target platforms configured to "Any CPU," so they should work fine in both x86 and x64.

As a side note, if you are interested in how to check or change the target of an assembly, you might find the CorFlags Conversion Tool useful. Based on my understanding, when this tool is ran against an assembly without options it will show the current "CorFlags" of the assembly. Then, you can check the PE and the 32BIT flags in order to know its target platform:

  • For AnyCPU: PE = PE32 and 32BIT = 0
  • For x86: PE = PE32 and 32BIT = 1
  • For x64: PE = PE32+ and 32BIT = 0

This, along with other interesting topics regarding this subject, are explained in the following blog post by Gaurav Seth:

I hope you find this useful,

Damian Cherubini
http://blogs.southworks.net/dcherubini

Apr 12, 2012 at 4:55 AM

Thanks Damian,

This is really helpful.

Regards, Rajendra.