【发布时间】:2020-10-08 04:44:14
【问题描述】:
我每次都必须手动更改 web.config 文件以适应我的可执行文件的路径
我的开发计算机上的配置与目标计算机上的配置不同
但变量替换似乎只适用于键,而不适用于标签属性
在这种情况下如何更改 processPath 值?
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="C:\WORK\ANGULAR\...\MyApp.exe" arguments="" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" hostingModel="InProcess">
<environmentVariables>
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />
<environmentVariable name="ASPNETCORE_HTTPS_PORT" value="443" />
</environmentVariables>
</aspNetCore>
</system.webServer>
</location>
</configuration>
有人遇到过同样的问题吗?
感谢您的宝贵时间
【问题讨论】:
-
嗨朋友,这个问题有什么更新吗?我已经更新了答案:)
标签: asp.net-core azure-devops path web-config