Share or reuse Visual Studio project settings – C++

Share or reuse Visual Studio project settings – C++
  • Article
  • 3 minutes to check out

To develop a customized group of settings that you can show others or recycle in numerous tasks, usage Property Manager to develop a residential or commercial property sheet(a props file) to save the settings for each type of task that you wish to have the ability to recycle or show others. Utilizing residential or commercial property sheets are far less error-prone than other methods of producing “worldwide” settings.


The issue with *. user files

Past variations of Visual Studio utilized international home sheets that had a user file name extension and were found in the AppData Local Microsoft MSBuild v4.0 folder. We no longer advise these files due to the fact that they set homes for job setups on a per-user, per-computer basis. Such “international” settings can disrupt builds, specifically when you are targeting more than one platform on your construct computer system. If you have both an MFC job and Windows Phone task, the user residential or commercial properties would be void for among them. Recyclable home sheets are more versatile and more robust.

Although user files are still set up by Visual Studio and take part in residential or commercial property inheritance, they’re empty by default. The very best practice is to erase any recommendation to them in Property Manager to guarantee that your tasks run individually of any per-user, per-computer settings. This practice is essential to make sure proper habits in a SCC (source code control) environment.

To show Property Manager, on the menu bar, select View > Property Manager or View > Other Windows > Property Manager, depending upon your settings.

If you wish to use a typical, often utilized set of residential or commercial properties to numerous tasks, you can utilize Property Manager to catch them in a recyclable home sheet file, which by convention has a props file name extension. You can use the sheet (or sheets) to brand-new jobs so you do not need to set those homes from scratch.

Screenshot of the Property Manager shortcut menu.

Under each setup node, you see nodes for each residential or commercial property sheet that uses to that setup. The system includes residential or commercial property sheets that set typical worths based upon alternatives you pick in the app wizard when you develop the task. Right-click any node and select Properties to see the residential or commercial properties that use to that node. All the home sheets are imported instantly into the task’s main residential or commercial property sheet ( ms.cpp.props) and are assessed in the order they appear in Property Manager. You can move them to alter the assessment order. Residential or commercial property sheets that are assessed later on bypass the worths in formerly assessed sheets. For more details about the order of assessment in the vcxproj file, the props and targets files, environment variables, and the command line, see Project residential or commercial property inheritance

If you select Add New Project Property Sheet and after that choose, for instance, the MyProps.props home sheet, a residential or commercial property page dialog box appears. Notification that it uses to the MyProps home sheet; any modifications you make are composed to the sheet, not to the job file (. vcxproj).

Like this post? Please share to your friends:
Leave a Reply

;-) :| :x :twisted: :smile: :shock: :sad: :roll: :razz: :oops: :o :mrgreen: :lol: :idea: :grin: :evil: :cry: :cool: :arrow: :???: :?: :!: