首页 > 解决方案 > VS2019 - VSTS - .NET Core 3.1:%LAUNCHER_PATH% 被替换

问题描述

我需要使用VSTS在远程IIS 服务器上部署.NET Core API

但是 Visual Studio 更改web.config,将变量processPath修改为我的本地 IIS 配置,每次我在本地运行应用程序时,即使我更改它

<aspNetCore processPath="some_local_path_not_existing_on_remote_server\myapi.exe" arguments="" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" hostingModel="InProcess">

所以当我部署应用程序时,路径与远程服务器路径不匹配

我尝试在 web.config 中使用%LAUNCHER_PATH% ,它也被替换了

我可以使用 VSTS 替换 web.config 中的值,但 %LANCHER_PATH% 更便携

为什么当我在本地运行应用程序时它会被替换?如何避免这种情况?

问候

标签: visual-studioweb-config

解决方案


推荐阅读