Visual Studio 2019 Enterprise在使用IIS Express调试/运行时自动添加COMPLUS_ForceENC环境变量

问题描述 投票:0回答:1

我正在使用Visual Studio Enterprise 2019版本16.3.10。每当我使用IIS Express运行/调试Web项目时,它都会添加COMPLUS_ForceENC环境变量,如下所示:

<environmentVariable name="COMPLUS_ForceENC" value="1" />

这里是屏幕打印,

enter image description here

每次将更改提交到源代码管理之前,我都需要撤消此更改。请谁能帮助我避免这种更改?

environment-variables web-config visual-studio-2019
1个回答
0
投票

很长一段时间后,我得到了Visual Studio开发人员社区的响应。

仅当web.config中包含以下部分时,才会更新web.config。您可以从web.config中删除以下内容,并且运行该应用程序不会更新现有的web.config。如果使用的是IISExpress,则可以从项目中删除完整的web.config。在IISExpress中运行,项目中不需要web.config。

<handlers>
  <remove name="aspNetCore" />
  <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="InProcess">
  <environmentVariables>
    <environmentVariable name="ASPNETCORE_HTTPS_PORT" value="44370" />
    <environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />
    <environmentVariable name="COMPLUS_ForceENC" value="1" />
  </environmentVariables>
</aspNetCore>

这里是link。>>

© www.soinside.com 2019 - 2024. All rights reserved.