In Visual Studio, the role of configuration and x86 settings in the platform and the x64 settings in the target platform

Source: Internet
Author: User

Looking at the properties of a project in Visual Studio, you'll find that there are two drop-down boxes at the top, where you can specify platform-related information, but there's also a target platform, where you can specify platform-related information, which is often confusing, How does a project have two settings, then the current item is compiled into that format.


Here's a simple explanation. The active, "activity" means a configuration of the whole solution. Including the VS toolbar in the Configuration Manager is now active, these two places are consistent. Configuration Manager allows you to set up a solution, and in this solution, set up a separate compilation platform for each project. Now in the diagram above is debug, if you change to something else, then the corresponding vs toolbar in the Configuration Manager is the most recent configuration you specify the scheme.


So why let a solution have a whole configuration? This involves the issue of references between projects. Suppose this, you have a Web site, called C,c reference a class library project B, then you use VisualStudio Publish this site build a release package, will let you choose a configuration, you choose is the entire solution configuration, VS will be based on the configuration you chose at that time , such as release, to see the compilation mode of each project under this configuration, and then compile. And you don't care about the settings for the target platform in the project property of Class B library projects now.

If you are debugging, Website C refers to B, if the individual now to compile a project, with the entire solution configuration is related. The answer is no matter. At this time you website target platform set is 64 bits, compiled is 64 bits, so the target platform of the reference B should also be set to x64, or any CPU.

In summary, it is when you rebuild all project locally that you compile it according to your current target platform and compile it to your local bin directory. The local debug or release operation is not related to the solution configuration. When you publish the entire solution, the individual project in the entire solution is compiled and published according to the configuration you choose.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.