If you find this error while compiling VS2012 Windows 8 (aka Window Store and/or Windows Metro) applications:
Error 13 /platform:anycpu32bitpreferred is not a valid setting for option /target:library or /target:module
then the solution seems to be to edit the csproj file to remove <Prefer32bit>true</Prefer32bit>
Here's where I found the solution: http://social.msdn.microsoft.com/Forums/en/toolsforwinapps/thread/927835d1-7c4d-4c30-acb7-848d8de5cb1b
Open the project file in notepad and remove <Prefer32Bit>true</Prefer32Bit> then reload it (you can also right click on the project in solution explorer, choose unload project, right click on the project again, choose edit someproject.csproj, after making the edit, save, and right click and reload.
Thanks for posting this. It just came in very useful. :)
ReplyDeleteI had the same issue. Based on @Slodge's suggesion, I changed the class library to an Windows Application, unchecked the Prefer 32 Bit flag, and then changed back to a Class Library
ReplyDelete