如何添加一个定义到ASP.net的解决方案? [英] How to add a define to an ASP.net solution?
本文介绍了如何添加一个定义到ASP.net的解决方案?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以添加一个定义
到的WinForms 通过项目的项目属性的:
i can add a define
to a WinForms project through the Project Properties:
我如何添加一个定义
到 ASP.net 解决方案?
How do i add a define
to an ASP.net solution?
更新:这里是Visual Studio 2010的外观在ASP.net的解决方案时,如:
Update: Here's what Visual Studio 2010 looks like when working in an ASP.net solution:
推荐答案
您是否尝试过使用的
compilerOptions
属性编译$ C在的web.config
$ C>Ⅴ族元素?像这样:
Have you tried using the compilerOptions
attribute of the compiler
v element in web.config
? Like so:
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp"
extension=".cs"
warningLevel="4"
type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
compilerOptions="/define:TRACE">
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="WarnAsError" value="false"/>
</compiler>
....
应该做的我觉得招...
Should do the trick I think...
这篇关于如何添加一个定义到ASP.net的解决方案?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文