.net core COMPLUS_ForceENC和ASPNETCORE_环境自动添加到ef core 3的web.config中
将ef core更新为版本3后。我的解决方案开始自动添加到web.config中。这会导致部署期间出现问题,因为在每个环境中都应该覆盖这些参数。我该怎么做才能得到这个空白.net core COMPLUS_ForceENC和ASPNETCORE_环境自动添加到ef core 3的web.config中,.net-core,.net-core-3.0,.net Core,.net Core 3.0,将ef core更新为版本3后。我的解决方案开始自动添加到web.config中。这会导致部署期间出现问题,因为在每个环境中都应该覆盖这些参数。我该怎么做才能得到这个空白 <environmentVariables> <environmentVariable name="COMPLUS_ForceENC" value="1" /> <environmentVariable name="ASPNETCORE_ENVIRONMENT"
<environmentVariables>
<environmentVariable name="COMPLUS_ForceENC" value="1" />
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />
</environmentVariables>
最简单的方法是添加
"ancmHostingModel": "OutOfProcess",
在launchSettings.json中
iisexpress的json看起来像
"IIS Express": {
"ancmHostingModel": "OutOfProcess",
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
}
}
现在web.config可以很好而且干净了这似乎不值得一个完整的答案,因为我仍然不知道为什么会这样,但是我发现升级到Visual Studio 16.8.3为我解决了这个问题