Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between Target CPU and Platform in Visual Studio 2013?

In VS 2013, in Compile in Project Properties, I see two configurations that seem the relate to the same thing (printscreen right below). Platform and Target CPU.

What's the difference? Is there any? enter image description here

like image 703
Rafael Dias da Silva Avatar asked Jan 12 '16 13:01

Rafael Dias da Silva


People also ask

What is platform in Visual Studio?

Visual Studio enables you to set up your application builds to target different platforms (processor architectures), such as x86 and x64. For 64-bit platform support for . NET development, see 64-bit applications. Note. Visual Studio runs as a 32-bit application.

How do I change from platform target to x64?

To enable x64 as a CPU platform targetClick Configuration Manager. In the Configuration Manager dialog, open the Active solution platform drop-down list box and click <New> …. In the New Solution Platform dialog, select x64 in the Type or select the new platform drop-down list box.

What does any CPU mean in Visual Studio?

The default setting, "Any CPU", means that the assembly will run natively on the CPU it is currently running on. Meaning, it will run as 64-bit on a 64-bit machine and 32-bit on a 32-bit machine. If the assembly is called from a 64-bit application, it will perform as a 64-bit assembly and so on.


1 Answers

By default the Platform strings are the same as the Target CPU or Mixed. However, since the Platform is a user configurable string you could give them any name or decouple them from the target CPU.

I'd not recommend decoupling them, as it can be very confusing.

But as your screenshot shows it's possible to create a Solution Configuration or Project Configuration named AnyCPU, yet configure your project to to build x86. Confusing as hell, but possible.

like image 83
jessehouwing Avatar answered Nov 15 '22 03:11

jessehouwing