Skip to main content
The 2026 Annual Developer Survey is live— take the Survey today!

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

9
  • 1
    The only other official MS reference to this solution that I've seen is in the Microsoft .NET Framework 4.5 RC Readme file. Strangely it was removed from the RTM Readme file. Commented Jul 10, 2013 at 15:51
  • 4
    This works, but not for a variation of the warning: "Referenced assembly ... targets a different processor than the application". It would be great if there was a similar setting for this warning? Commented Feb 20, 2014 at 16:38
  • 10
    "my projects platform is AnyCPU and I'm referencing an MS library built for AMD64"... This is WRONG. Since your target deployment is always 64-bit, you can set your platform to x64, which makes for a more appropriate error if your 64-bit assumption ever gets violated, and also prevents the warning. Commented May 21, 2015 at 16:34
  • 3
    @BenVoigt a great idea in theory, but VS being a x86 process needs x86 builds of controls to run stuff like the Windows Forms Designer, even if your application will only ever be 64 bit. It's a valid, but unfortunate reason to use a false "Any CPU" build. Commented Feb 19, 2018 at 19:49
  • 1
    @jrh: Then put the GUI in a DLL project, and build that as AnyCPU. The EXE needs to be marked with the right architecture to match the native dependencies. Proper separation of GUI from logic goes a long way (although it does still have its limits, such as when the native code is rendering part of the GUI, but then designer support is a lost cause unless you do builds of the entire project for both x86 and x64) Commented Feb 19, 2018 at 21:56

default