visual-studio GUI 在 VS 2010 项目中包含 .prop 文件?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2985899/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 12:04:42  来源:igfitidea点击:

GUI to include a .prop file in a VS 2010 project?

visual-studiovisual-studio-2008visual-studio-2010

提问by jwfearn

Visual Studio 2010 has no longer uses .vspropsfiles and instead uses .propsfiles.

Visual Studio 2010 不再使用.vsprops文件,而是使用.props文件。

To include a .vspropsfile in a Visual Studio 2008 project, one could right-click the project icon in the Solution Explorerpanel, choose Properties, go to the Configuration Properties | Generalsection, and modify the Inherited Project Property Sheetsproperty to contain a list of .vspropspaths. One could also modify the Visual Studio 2008 project file directly.

.vsprops在 Visual Studio 2008 项目中包含文件,可以右键单击解决方案资源管理器面板中的项目图标,选择Properties,转到Configuration Properties | 。General部分,并修改Inherited Project Property Sheets属性以包含.vsprops路径列表。也可以直接修改 Visual Studio 2008 项目文件。

Is there a way in the Visual Studio 2010 GUI to include .propsfiles in a project? The Inherited Project Property Sheetsproperty seems to have been removed. If manual editing of the project file is the only way to include .propsfiles, where can one find documentation on doing it?

Visual Studio 2010 GUI 中有没有办法在.props项目中包含文件?在继承的项目属性表属性似乎已被删除。如果手动编辑项目文件是包含.props文件的唯一方法,那么在哪里可以找到有关这样做的文档?

I'm not talking about adding a .propsfile to the list of files in the project, I mean how do I tell the project to usea .propsfile.

我不是在谈论添加.props文件到项目中的文件列表,我的意思是我怎么告诉该项目使用一个.props文件。

回答by Hans Passant

That hasn't changed. Use View > Other Windows > Property Manager. Navigate the tree view there and open the configuration you want to change. Right-click > Add New.

那没有改变。使用视图 > 其他窗口 > 属性管理器。在那里导航树视图并打开要更改的配置。右键单击 > 添加新。



If you don't see this menu option then you can repair the menu with Tools > Customize, Commands tab. Select "View" and click Add Command. Select "View" in the left listbox, "Property Manager" in the right one. That adds the command back to your View menu.

如果您没有看到此菜单选项,则可以使用“工具”>“自定义”、“命令”选项卡修复菜单。选择“查看”并单击“添加命令”。在左侧列表框中选择“查看”,在右侧选择“属性管理器”。这会将命令添加回您的视图菜单。

It is odd that it is missing of course, could have happened when you installed VS2010 and it imported your VS2008 settings. This feature is not flawless, judging from other programmers' questions about it, beware that you might be missing out on other menu items. If you haven't customized anything extensively then Tools > Import and Export Settings, Reset might be a good idea.

奇怪的是,它当然丢失了,当您安装 VS2010 并导入您的 VS2008 设置时可能会发生这种情况。从其他程序员对此提出的问题来看,此功能并非完美无缺,请注意您可能会错过其他菜单项。如果您没有广泛自定义任何内容,那么工具 > 导入和导出设置,重置可能是一个好主意。

回答by Dean Harding

You can go to View -> Other Windows -> Property Manager to open up the list of property sheets and so on. This works in both VS 2008 & 2010.

您可以通过查看-> 其他窗口-> 属性管理器打开属性表列表等。这适用于 VS 2008 和 2010。

回答by Jeff M

Once you find the Property Manager you will see a list of your projects. right click on the project that you want to add a .props file for and choose "Add Existing Property Sheet". You can also choose to add a new property sheet. I have my property sheet in the same folder as my solution file so that all my projects can use the same property sheet.

找到 Property Manager 后,您将看到项目列表。右键单击要为其添加 .props 文件的项目,然后选择“添加现有属性表”。您还可以选择添加新的属性表。我的属性表与我的解决方案文件位于同一文件夹中,以便我的所有项目都可以使用相同的属性表。

回答by Paul A. Bristow

These posts didn't quite answer my need to choose the right Boost downloaded binaries library folder. boost_1_61_0_b1 lib32-msvc-14.0 or lib64-msvc-14.0

这些帖子并没有完全满足我选择正确的 Boost 下载二进制文件库文件夹的需要。boost_1_61_0_b1 lib32-msvc-14.0 或 lib64-msvc-14.0

For some suggestions for this application see

有关此应用程序的一些建议,请参阅

http://boost.2283326.n4.nabble.com/How-to-write-one-property-page-props-to-select-the-right-x86-or-x64-Boost-libraries-folder-automatico-td4686269.html#a4686272

http://boost.2283326.n4.nabble.com/How-to-write-one-property-page-props-to-select-the-right-x86-or-x64-Boost-libraries-folder-automatico- td4686269.html#a4686272