{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/Templates/issues/678","repository_url":"https://api.github.com/repos/aspnet/Templates","labels_url":"https://api.github.com/repos/aspnet/Templates/issues/678/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Templates/issues/678/comments","events_url":"https://api.github.com/repos/aspnet/Templates/issues/678/events","html_url":"https://github.com/aspnet/Templates/pull/678","id":183149768,"number":678,"title":"Remove appsettings.{env.EnvironmentName}.json files","user":{"login":"cwe1ss","id":4581460,"avatar_url":"https://avatars.githubusercontent.com/u/4581460?v=3","gravatar_id":"","url":"https://api.github.com/users/cwe1ss","html_url":"https://github.com/cwe1ss","followers_url":"https://api.github.com/users/cwe1ss/followers","following_url":"https://api.github.com/users/cwe1ss/following{/other_user}","gists_url":"https://api.github.com/users/cwe1ss/gists{/gist_id}","starred_url":"https://api.github.com/users/cwe1ss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cwe1ss/subscriptions","organizations_url":"https://api.github.com/users/cwe1ss/orgs","repos_url":"https://api.github.com/users/cwe1ss/repos","events_url":"https://api.github.com/users/cwe1ss/events{/privacy}","received_events_url":"https://api.github.com/users/cwe1ss/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aspnet/Templates/labels/cla-already-signed","name":"cla-already-signed","color":"009800"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-14T21:03:14Z","updated_at":"2016-10-14T21:29:55Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/aspnet/Templates/pulls/678","html_url":"https://github.com/aspnet/Templates/pull/678","diff_url":"https://github.com/aspnet/Templates/pull/678.diff","patch_url":"https://github.com/aspnet/Templates/pull/678.patch"},"body":"ASP.NET Core applications default to `Production` when there's no `ASPNETCORE_ENVIRONMENT` environment variable or `launchSettings.json` file. This has been done for security reasons to make sure, production environments don't show stack traces etc.\r\n\r\nHowever, this also means people have to be careful that they don't get unintended side effects when they accidentally end up targeting the production environment. This could happen for various reasons, but the most obvious one might be that `dotnet run` does not honor the `launchSettings.json` file. If people don't set the environment variable on their PC, they could easily target Production when they switch between Visual Studio and dotnet cli.\r\n\r\nOf course, people should not store sensitive data (e.g. connection strings) in these files, but even regular \"app settings\" could lead to unintended side effects (e.g. webhook URLs, ...)\r\n\r\nThere's also the scenario where people use certificates to get secrets from e.g. Azure Key Vault. In this case, the thumbprint isn't a secret and could be committed to source control. If the production certificate happens to end up on a developer's machine (this is a no-go but it could happen due to troubleshooting sessions etc.), \"bad things\" :tm: will happen.\r\n\r\nAnother aspect of this is that people who use IIS/IIS express don't see which environment they are targeting.\r\n\r\nThe best solution for this would be to make sure, production configs aren't in the same project. Instead, people should use environment variables, azure app settings, CI systems that merge the files on deployment, etc.\r\n\r\nThis PR would remove the active promotion of this feature. It would require people to make an active decision (and hopefully understand the advantages/disadvantages) if they wanted to keep using this workflow.\r\n\r\nConcerns about defaulting to production have been raised in aspnet/hosting ( https://github.com/aspnet/Hosting/issues/863, https://github.com/aspnet/Hosting/pull/720 ), so I'm creating this PR as a discussion point based on @blowdart's and @muratg's feedback."},"comment":{"url":"https://api.github.com/repos/aspnet/Templates/issues/comments/253924321","html_url":"https://github.com/aspnet/Templates/pull/678#issuecomment-253924321","issue_url":"https://api.github.com/repos/aspnet/Templates/issues/678","id":253924321,"user":{"login":"peterblazejewicz","id":14539,"avatar_url":"https://avatars.githubusercontent.com/u/14539?v=3","gravatar_id":"","url":"https://api.github.com/users/peterblazejewicz","html_url":"https://github.com/peterblazejewicz","followers_url":"https://api.github.com/users/peterblazejewicz/followers","following_url":"https://api.github.com/users/peterblazejewicz/following{/other_user}","gists_url":"https://api.github.com/users/peterblazejewicz/gists{/gist_id}","starred_url":"https://api.github.com/users/peterblazejewicz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterblazejewicz/subscriptions","organizations_url":"https://api.github.com/users/peterblazejewicz/orgs","repos_url":"https://api.github.com/users/peterblazejewicz/repos","events_url":"https://api.github.com/users/peterblazejewicz/events{/privacy}","received_events_url":"https://api.github.com/users/peterblazejewicz/received_events","type":"User","site_admin":false},"created_at":"2016-10-14T21:29:55Z","updated_at":"2016-10-14T21:29:55Z","body":"Is there any high-level overview for this change or discussion - other then linked one?\r\nI could be wrong, but isn't that only VS tooling creates environment files by default?\r\nOther tools do not create multiple environment settings by default, eg.: https://github.com/dotnet/cli/tree/rel/1.0.0/src/dotnet/commands/dotnet-new/CSharp_Web\r\n\r\n"}}
{"actor":{"display_login":"peterblazejewicz"}}