Working with Project Properties The new home for Visual Studio documentation is Visual Studio 2.Documentation on docs.The latest version of this topic can be found at Working with Project Properties.In the IDE, all information that is needed to build a project is exposed as properties.This information includes the application name, extension such as DLL, LIB, EXE, compiler options, linker options, debugger settings, custom build steps, and many other things.You use property pages Project Properties to view and modify these properties.When you create a project, the system assigns values for various properties.The defaults vary somewhat depending on the kind of project and what options you choose in the app wizard.For example, an ATL project has properties related to MIDL files, but these are absent in a basic console application.The default properties are shown in the General pane in the Property Pages Some properties, such as the application name, apply to all build variations, regardless of the target platform or whether it is a debug or release build.But most properties are configuration dependent.This is because the compiler has to know what specific platform the program will run on and what specific compiler options to use in order to generate the correct code.Therefore, when you set a property, it is important to pay attention to which configuration and platform the new value should apply to.Should it apply only to Debug Win.Debug ARM and Debug x.For example, the Optimization property, by default, is set to Maximize Speed O2 in a Release configuration, but is disabled in the Debug configuration.The property pages are designed so that you can always see, and if necessary modify, which configuration and platform a property value should apply to.The following illustration shows the property pages with the configuration and platform information in the list boxes at the top.When the Optimization property is set here, it will apply only to Debug Win.The following illustration shows the same project property page, but the configuration has been changed to Release.Note the different value for the Optimization property.Also note that the active configuration is still Debug.You can set properties for any configuration here it doesnt have to be the active one.The project system itself is based on MSBuild, which defines file formats and rules for building projects of any kind.MSBuild manages much of the complexity of building for multiple configurations and platforms, but you need to understand a little bit about how it works.This is especially important if you want to define custom configurations or create reusable sets of properties that you can share and import into multiple projects.Project properties are stored either directly in the project file.As shown earlier, the same property for the same configuration may be assigned a different value in different files.When you build a project, the MSBuild engine evaluates the project file and all the imported files in a well defined order described below.As each file is evaluated, any property values defined in that file will override the existing values.Any values that are not specified are inherited from files that were evaluated earlier.MaK9nDFTC38/UYPWVnrBrLI/AAAAAAAAHx0/1GVLx-uu0lg/s1600/1537.image_102DD9BA.png' alt='Microsoft Visual Studio Source Code Control Best' title='Microsoft Visual Studio Source Code Control Best' />
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |