views:

511

answers:

1

On a recent episode of dotnetrocks (episode #404) they mentioned that a lot of Visual Studio issues could be reduced if you set the platform target to be x86 instead of 'anycpu'. I did a few google searches and couldn't find anything about it.

At my company we have a mix of x86 and x64 developer machines. There are some issues with losing references of third party components installed under 'program files (x86)' vs 'program files' when switching back and forth between the developers on different machines.

Would switching to target x86 machines fix this issue with 'program files (x86)'?
Also are there sites or posts I can read more about this? ( I couldn't find any!)

+1  A: 

The underlying switch is /platform:. I suggest reading this first:

http://msdn.microsoft.com/en-us/library/zekwfyz4.aspx

If your 3rd party components are unmanaged code (or the assembly was built with anything but /platform:anyCpu), you need to target 32 bit (unless the vendor provides a 64-bit version). It is just easier to target the lowest common denominator so building isn't complicated by creating one config for 64 and another for 32 bits.

Check this out as well: http://stackoverflow.com/questions/319585/should-net-anycpu-projects-bind-to-framework-or-framework64-dlls#319612

HTH

Colby Africa

Colby Africa