{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/Home/issues/1431","repository_url":"https://api.github.com/repos/aspnet/Home","labels_url":"https://api.github.com/repos/aspnet/Home/issues/1431/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Home/issues/1431/comments","events_url":"https://api.github.com/repos/aspnet/Home/issues/1431/events","html_url":"https://github.com/aspnet/Home/issues/1431","id":153893787,"number":1431,"title":"\"web\" profile does not read Environment Variables from launchSettings.json","user":{"login":"kcd83","id":707312,"avatar_url":"https://avatars3.githubusercontent.com/u/707312?v=4","gravatar_id":"","url":"https://api.github.com/users/kcd83","html_url":"https://github.com/kcd83","followers_url":"https://api.github.com/users/kcd83/followers","following_url":"https://api.github.com/users/kcd83/following{/other_user}","gists_url":"https://api.github.com/users/kcd83/gists{/gist_id}","starred_url":"https://api.github.com/users/kcd83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kcd83/subscriptions","organizations_url":"https://api.github.com/users/kcd83/orgs","repos_url":"https://api.github.com/users/kcd83/repos","events_url":"https://api.github.com/users/kcd83/events{/privacy}","received_events_url":"https://api.github.com/users/kcd83/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-05-09T23:39:22Z","updated_at":"2017-12-31T05:35:05Z","closed_at":null,"author_association":"NONE","body":"There seems to be something different about the \"web\" profile (loaded from the `project.json` \"commands\" maybe?) and the Environment Variables are not working correctly. \n\nIf I add Environment Variables via the project Properties they get added to `launchSettings.json` and work as expected until I close Visual Studio. If reopen the project these are not read back, they do not show in the Properties UI nor are they applied when running the project.\n\n![image](https://cloud.githubusercontent.com/assets/707312/15131119/64feffa2-16a1-11e6-931e-c4658f367050.png)\n\n`launchSettings.json`\n\n``` javascript\n{\n  \"iisSettings\": {\n    \"windowsAuthentication\": false,\n    \"anonymousAuthentication\": true,\n    \"iisExpress\": {\n      \"applicationUrl\": \"http://localhost:54929/\",\n      \"sslPort\": 0\n    }\n  },\n  \"profiles\": {\n    \"IIS Express\": {\n      \"commandName\": \"IISExpress\",\n      \"launchBrowser\": true,\n      \"launchUrl\": \"api/values\",\n      \"environmentVariables\": {\n        \"ServiceOptions:MongoConnection\": \"mongodb://10.0.0.50:27017\",\n        \"Hosting:Environment\": \"Development\",\n        \"ServiceOptions:RabbitConnection\": \"amqp://10.0.0.50\"\n      }\n    },\n    \"web\": {\n      \"commandName\": \"web\",\n      \"environmentVariables\": {\n        \"ServiceOptions:MongoConnection\": \"mongodb://10.0.0.50:27017\",\n        \"Hosting:Environment\": \"Development\",\n        \"ServiceOptions:RabbitConnection\": \"amqp://10.0.0.50\"\n      }\n    },\n    \"testing\": {\n      \"commandName\": \"web\",\n      \"environmentVariables\": {\n        \"ServiceOptions:MongoConnection\": \"mongodb://10.0.0.50:27017\",\n        \"Hosting:Environment\": \"Development\",\n        \"ServiceOptions:RabbitConnection\": \"amqp://10.0.0.50\"\n      }\n    }\n  }\n}\n```\n\nInteresting points:\n- testing and IIS Express work as expected\n- If I rename the \"web\" profile (\"kestrel\") it works as expected _however_ there will still be a \"web\" which still only shows `Hosting:Environment`\n\nMy thinking is there may be some merging of `project.json` commands with profiles that is misbehaving, just a guess, is it the \"web\" - \"web\" name clash?\n\nWorkaround is to simply rename the \"web\" profile to \"kestrel\" in `launchSettings.json`  and use that.\n"},"comment":{"url":"https://api.github.com/repos/aspnet/Home/issues/comments/354586360","html_url":"https://github.com/aspnet/Home/issues/1431#issuecomment-354586360","issue_url":"https://api.github.com/repos/aspnet/Home/issues/1431","id":354586360,"user":{"login":"aspnet-hello","id":34947467,"avatar_url":"https://avatars3.githubusercontent.com/u/34947467?v=4","gravatar_id":"","url":"https://api.github.com/users/aspnet-hello","html_url":"https://github.com/aspnet-hello","followers_url":"https://api.github.com/users/aspnet-hello/followers","following_url":"https://api.github.com/users/aspnet-hello/following{/other_user}","gists_url":"https://api.github.com/users/aspnet-hello/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet-hello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet-hello/subscriptions","organizations_url":"https://api.github.com/users/aspnet-hello/orgs","repos_url":"https://api.github.com/users/aspnet-hello/repos","events_url":"https://api.github.com/users/aspnet-hello/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet-hello/received_events","type":"User","site_admin":false},"created_at":"2017-12-31T05:35:05Z","updated_at":"2017-12-31T05:35:05Z","author_association":"NONE","body":"This issue is being closed because it has not been updated in 3 months.\r\n\r\nWe apologize if this causes any inconvenience. We ask that if you are still encountering this issue, please log a new issue with updated information and we will investigate.\r\n"}}
{"actor":{"display_login":"aspnet-hello"}}