Just to add, since you are showing windows-mobile and windows-mobile-6, you should change your #define
constraint to PocketPC
instead of COMPACT_FRAMEWORK
.
#ifdef PocketPC // PocketPC is what the WM SDK uses
MyEncryptMethod("filename");
#else // I'm compiling this from a desktop project
File.Encrypt("filename");
#endif
Update:
Nick: What yms said. :) When building a project using one of the Smart Device projects, Visual Studio automatically add the conditional compilation symbol PocketPC
to the project.
From within VS2008's Main Menu, click Project and select your project's Properties at the bottom.
On your project's Properties page, go to the Build tab, and there you will see where PocketPC
is already defined for you.