Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between platform and platform target in VS

What's the difference between setting the platform -->

alt text

over setting the platform target in Build -->

alt text

like image 897
DotnetDude Avatar asked Nov 03 '10 19:11

DotnetDude


People also ask

What is the platform target?

What Does Target Platform Mean? “Target platform” is a generally used term in IT to discuss a platform of focus. A target platform can refer to the platform that something is being built for, a platform that is desirable for use, or simply a platform that a particular technology is focusing on.

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 is active solution platform in Visual Studio?

The Active Solution Platform allows you to configure a specific combination of configurations for each project. The Project Platform allows you to make specific configuration settings for a project.


1 Answers

The first screen shot is showing the solution configuration (Debug) and solution platform (Mixed Platforms). What this is saying is that building a Debug version of the solution, the projects that make up the solution can target Mixed Platforms. If you explicitly chose x86, that means all your projects in your solution should use this platform configuration. Configuration Manager under Tools provides you with means of selecting the Configuration and Platform solution wide, or for individual projects. The important thing to realize here, is that you're only selecting configuration, and it's the settings for the configuration that are defined else where, namely Project Properties (which brings us to the second screen shot).

The second screen shot is found in Project Properties in the build tab, and it is here where you can apply various settings for the combination of Configuration and Platform. So it's here where you can explicitly define what platform you want the build to target, given the configuration and platform marker. So it's possible for the Debug, Any CPU configuration to target x86 only.

This may not make much sense, and it's not very intuitive, but if you realize that you can define your own configuration values, then you have to some way specify the target platform for that configuration.

like image 65
stantona Avatar answered Sep 30 '22 10:09

stantona