Visual Studio 2019 Enterprise 在 debugging/running 使用 IIS Express 时自动添加 COMPLUS_ForceENC 环境变量
Visual Studio 2019 Enterprise automatically adds COMPLUS_ForceENC environment variable while debugging/running using IIS Express
我正在使用 Visual Studio Enterprise 2019 版本 16.3.10。每当我 run/debug 我的 Web 项目使用 IIS Express 时,它都会添加 COMPLUS_ForceENC 环境变量 ,如下所示:
<environmentVariable name="COMPLUS_ForceENC" value="1" />
这是屏幕截图,
每次我需要在将更改提交到源代码管理之前撤消此更改。请任何人帮助我如何避免这种变化?
很久以后,我得到了 Visual Studio 开发者社区的回应。
The web.config only gets updated if you have the following section present in the web.config. You can remove the following from the web.config and running the application will not update the existing web.config. if you are using IISExpress, You can alternatively remove the full web.config from the project. web.config is not required in the project for running in IISExpress.
<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。
添加此环境变量似乎是启用“编辑并继续”调试器功能的解决方法。
我正在使用 Visual Studio Enterprise 2019 版本 16.3.10。每当我 run/debug 我的 Web 项目使用 IIS Express 时,它都会添加 COMPLUS_ForceENC 环境变量 ,如下所示:
<environmentVariable name="COMPLUS_ForceENC" value="1" />
这是屏幕截图,
每次我需要在将更改提交到源代码管理之前撤消此更改。请任何人帮助我如何避免这种变化?
很久以后,我得到了 Visual Studio 开发者社区的回应。
The web.config only gets updated if you have the following section present in the web.config. You can remove the following from the web.config and running the application will not update the existing web.config. if you are using IISExpress, You can alternatively remove the full web.config from the project. web.config is not required in the project for running in IISExpress.
<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。
添加此环境变量似乎是启用“编辑并继续”调试器功能的解决方法。