在哪里可以定义 Delphi Prism 的条件编译常量?

发布于 2024-07-13 06:59:38 字数 429 浏览 11 评论 0原文

我刚刚将一个 Web 服务从 Delphi.NET 2006 移植到 Delphi Prism 2009(在 Visual Studio 2008 IDE 中运行)。 但我找不到应该在哪里设置(或取消设置)条件编译常量!

我是瞎了眼吗,这个选项被忽略了,还是VS不支持它?

[编辑:感谢 Mohammed Nasman 提供的链接] MSDN 告诉我使用项目设计器来设置它们。 首先,我花了一段时间才发现项目菜单仅在选择解决方案(而不是 Web 服务项目)时才可见。 那么,仍然无法在项目设计器中设置条件编译常量!

我只是找不到在 ASP.NET 项目中访问 项目选项 的方法……真的不可能吗?

I've just ported a Web service from Delphi.NET 2006 to Delphi Prism 2009 (running in the Visual Studio 2008 IDE). But I can't find where I'm supposed to set (or unset) the conditional compilation constants!

Am I blind, has this option been left out, or is it just not supported in VS?

[edit: thanks to Mohammed Nasman for the link] MSDN tells me to set them using the Project Designer. First, it took me a while to figure out that the Project menu is only visible when the Solution is selected (and not the web service project). Then, there's still no way to set conditional compilation constants in the Project Designer!

I just can't find a way to get to the Project Options in an ASP.NET project... Is it really not possible?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

鹿! 2024-07-20 06:59:38

如果您右键单击解决方案资源管理器中的项目节点(任何项目,而不仅仅是 Delphi Prism),然后单击上下文菜单中的“属性”选项,项目选项选项卡应出现在文本编辑器窗格中。 单击“构建”选项卡,它应该是左侧向下的第三个选项卡。 该页面上出现的第一个文本框应标记为“条件编译符号”。 它应该已经包含符号:“DEBUG;TRACE”。 您可以在那里添加自己的符号。

您还可以通过在解决方案资源管理器中选择项目节点,然后单击解决方案资源管理器窗口中左上角的工具栏按钮来访问项目属性选项卡。

If you right click on a project node (any project, not just Delphi Prism) in the solution explorer and then click on the Properties option in the context menu the project options tab-book should appear in the text editor pane. Click on the build tab, it should be the third tab down on the left hand side. The first text-box that appears on that page should be labelled "Conditional Compilation Symbols". It should already contain the symbols: "DEBUG;TRACE". You can add your own symbols there.

You can also get to the project properties tab-book by selecting the project node in the solution explorer and then clicking on the top-left hand toolbar button in solution explorer window.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文