我在.net核心中遇到LaunchSettings.json的问题。我在配置文件中将我的APP设置为生产模式,但是它进入了开发模式。如果我将第一个IIS Express更改为生产,那么它将进入生产模式。为什么会这样?
在这里您可以找到我的json文件的摘要。
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:34527",
"sslPort": 44378
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": false,
"launchUrl": "api/values",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"DatingApp.API": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "api/values",
"applicationUrl": "http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Production"
}
}
}
}