You just need to add a configuration for Any CPU in the configuration manager.
1) Right-click the solution and select Properties
2) Select Configuration Properties, then click Configuration Manager...
3) Change the Active Solution platform to Any CPU. If there is no Any CPU platform, skip to #4.
4) Click the arrow in the combo box under the Platform column for your class library, and select New...
5) Make sure "Any CPU" is selected under New Platform. If there was no Any CPU solution platform in step 3, then make sure the "Create new solutions platform" checkbox is checked. Then click OK.
6) Check the checkbox in the "Build" column for your class library
7) Close out of the Configuration Manager, and open the properties for your class library
8) Select Any CPU for Platform, then select Any CPU for Platform target, and save.
(Step 8 may or may not be necessary, depending on what has been done with the configurations previously.)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…