开发者

Difference between platform and platform target in VS

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

Difference between platform and platform target in VS

over setti开发者_JAVA百科ng the platform target in Build -->

Difference between platform and platform target in VS


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.


An important distinction here:

  • Platform can have any value. It is user-defined.
  • PlatformTarget must have a valid value of AnyCPU, x86, x64, ARM, ...
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜