.NET Platform Targeting &c

Platform targeting in .NET applications employs a confusing jumble of project and solution settings that look identical but are actually independent. The AnyCPU Versus Any CPU spelling hack is a relatively harmless example. Much more serious is the possibility of mismatched explicit target platforms after repeated editing of project and solution settings.

Galaktor’s thorough article Targeting Platforms in Visual Studio explains how target platforms are specified in solution and project files, how those settings can go out of sync, and how to avoid that. I prefer to clean up my solution and project files by hand rather than through the laborious Visual Studio UI, but I definitely agree with his recommendation to keep them in source code control so you notice immediately when some setting has changed that shouldn’t have.

This excellent 2011 article had just come to my attention, so I added a new entry to Weird .NET Issues. There are also some new articles for Visual Studio users:

Finally, Michael Croucher has posted a nice tutorial on Using the Intel C++ Compiler with Visual Studio 2010. Android owners shouldn’t miss his 9 ways to program for Android devices using Android devices – turn your Nexus 7 into a (tiny) Lisp machine!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.