如何在 ASP.NET 网站项目中定义 TRACE 编译标志?
如何在 ASP.NET 网站项目中定义 TRACE 编译标志?我可以找到的 Visual Studio 中没有 .proj 文件,也没有任何构建对话框中的选项。
我正在使用 Visual Studio 2008 和 ASP.NET 2.0。
How do you define the TRACE compile flag in a ASP.NET Web Site project? There is no .proj-file and there are no options in any Build-dialogs in Visual Studio that I can find.
I'm using Visual Studio 2008 and ASP.NET 2.0.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
阅读本文:
演练:将 ASP.NET 跟踪与 System.Diagnostics 跟踪集成
http://msdn.microsoft.com/en-us/library/b0ectfxd%28v=VS.80%29.aspx
查找副标题“在启用跟踪的情况下自动编译应用程序”
您需要在 web.config 中添加类似的内容:
这是 web.config 中编译器部分的文档,尽管它没有提及 Trace 内容:
http://msdn.microsoft.com/en-us/library/y9x69bzw%28v=VS.80%29.aspx
我刚刚尝试过,它对我有用。
Read this article:
Walkthrough: Integrating ASP.NET Tracing with System.Diagnostics Tracing
http://msdn.microsoft.com/en-us/library/b0ectfxd%28v=VS.80%29.aspx
Look for the subheading "To compile your application automatically with trace enabled"
You need to put something like this in your web.config:
Here's the docs on the compiler section in the web.config, though it does not mention Trace stuff:
http://msdn.microsoft.com/en-us/library/y9x69bzw%28v=VS.80%29.aspx
I just tried it and it works for me.