Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.net core COMPLUS_ForceENC和ASPNETCORE_环境自动添加到ef core 3的web.config中_.net Core_.net Core 3.0 - Fatal编程技术网

.net core COMPLUS_ForceENC和ASPNETCORE_环境自动添加到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"

将ef core更新为版本3后。我的解决方案开始自动添加到web.config中。这会导致部署期间出现问题,因为在每个环境中都应该覆盖这些参数。我该怎么做才能得到这个空白

  <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为我解决了这个问题