我刚刚更新了我的Visual Studio对ASP.NET核心1.1.1项目时。在更新之前,我连续传递到Azure的工作非常好。现在,我在部署后查看Web App时收到错误消息。它是无法找到appsettings.json在根位置:Azure的Web应用程序失败的Visual Studio更新后定位appsettings.json
The configuration file 'appsettings.json' was not found and is not optional. The physical path is 'D:\home\site\wwwroot\appsettings.json'.
它现在正在寻找在wwwroot文件夹中的文件。这不是它在更新之前寻找的基本路径。我还没有更新到ASP.NET 2.0的核心。
我configurationbuilder看起来是这样的:
var builder = new ConfigurationBuilder()
.SetBasePath(env.ContentRootPath)
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true);
应该是移动或这里发生了什么的appsettings.json文件?