我想在Octopus Deploy中应用web.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>
如果你只想将其应用于生产环境,请确保你的生产Web配置文件名为: Web.Production.config。确保 Web..Config 与 Octopus 中的环境名称匹配。再次强调,这些细节在 Octopus 部署网站的文档中有详细说明。