C# 生成可调试的Web.Debug.config
我有一个网络角色 它的web.config有以下几行代码C# 生成可调试的Web.Debug.config,c#,azure-web-roles,webrole,C#,Azure Web Roles,Webrole,我有一个网络角色 它的web.config有以下几行代码 <system.web> <compilation debug="false" targetFramework="4.5.1" /> 我可以自定义上述转换吗? 这方面有一个指导,但我不确定如何为具体案例编写转换 我在Web.Debug.Config中定义了以下转换` <system.web> <compilation debug="true" xdt:Tran
<system.web>
<compilation debug="false" targetFramework="4.5.1" />
我可以自定义上述转换吗?
这方面有一个指导,但我不确定如何为具体案例编写转换
我在Web.Debug.Config中定义了以下转换`
<system.web>
<compilation debug="true"
xdt:Transform="Replace">
</compilation>
</system.web>
我仍然无法调试,并要求手动更改该值当您从以下来源运行/调试时,不会使用web.debug.config: 在
Web.config
中设置debug=“true”
并使用Web.release.config
将其删除会更容易
示例Web.Release.Config:
<?xml version="1.0"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<system.web>
<compilation xdt:Transform="RemoveAttributes(debug)" />
</system.web>
</configuration>
当您想要调试时,您必须将其设置为true
,而不是false
yes-确定我的意思。你应该试试你的解决方案,告诉我们是否可以。如果不正常,当前结果是什么?我需要在调试中进行更改
<?xml version="1.0"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<system.web>
<compilation xdt:Transform="RemoveAttributes(debug)" />
</system.web>
</configuration>