6

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

4
  • The solution platform name is only relevant when your solution has any C or C++ projects. They need to built differently with a different compiler and linker. Not an issue with a VB.NET project, it has only one compiler. Whether the final program runs in 32-bit or 64-bit mode depends on the operating system you run on. And the jitter you ask for with the Target CPU setting, it sometimes makes sense to force 32-bit mode even though it runs on a 64-bit OS. Commented Jan 12, 2016 at 13:30
  • The platform name is a user configurable string, but by default it's linked to the Target CPU. Commented Jan 12, 2016 at 13:37
  • @HansPassant, not true, if your VB code calls into native code using P/Invoke DllImport or when you're using Pointer magic or when you want to read items from the x64 or the wow registry hyves. Commented Jan 12, 2016 at 14:01
  • Well, that is the "sometimes" clause of course. Commented Jan 12, 2016 at 14:02

1 Answer 1

6

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.