{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/Mvc/issues/4453","repository_url":"https://api.github.com/repos/aspnet/Mvc","labels_url":"https://api.github.com/repos/aspnet/Mvc/issues/4453/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Mvc/issues/4453/comments","events_url":"https://api.github.com/repos/aspnet/Mvc/issues/4453/events","html_url":"https://github.com/aspnet/Mvc/issues/4453","id":147816629,"number":4453,"title":"Problem with Services.AddSingleton<IConfiguration>(_=>Configuration) ","user":{"login":"jcsotoo92","id":11417270,"avatar_url":"https://avatars.githubusercontent.com/u/11417270?v=3","gravatar_id":"","url":"https://api.github.com/users/jcsotoo92","html_url":"https://github.com/jcsotoo92","followers_url":"https://api.github.com/users/jcsotoo92/followers","following_url":"https://api.github.com/users/jcsotoo92/following{/other_user}","gists_url":"https://api.github.com/users/jcsotoo92/gists{/gist_id}","starred_url":"https://api.github.com/users/jcsotoo92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcsotoo92/subscriptions","organizations_url":"https://api.github.com/users/jcsotoo92/orgs","repos_url":"https://api.github.com/users/jcsotoo92/repos","events_url":"https://api.github.com/users/jcsotoo92/events{/privacy}","received_events_url":"https://api.github.com/users/jcsotoo92/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-04-12T17:14:22Z","updated_at":"2016-04-12T20:56:02Z","closed_at":null,"body":"I can´t add the configuration by dependency injection, i have this line:\r\n\r\n Services.AddSingleton<IConfiguration>(_=>Configuration) ;\r\n\r\nand it shows an error, i've tried to found the correct syntax but i could not."},"comment":{"url":"https://api.github.com/repos/aspnet/Mvc/issues/comments/209098476","html_url":"https://github.com/aspnet/Mvc/issues/4453#issuecomment-209098476","issue_url":"https://api.github.com/repos/aspnet/Mvc/issues/4453","id":209098476,"user":{"login":"pranavkm","id":174281,"avatar_url":"https://avatars.githubusercontent.com/u/174281?v=3","gravatar_id":"","url":"https://api.github.com/users/pranavkm","html_url":"https://github.com/pranavkm","followers_url":"https://api.github.com/users/pranavkm/followers","following_url":"https://api.github.com/users/pranavkm/following{/other_user}","gists_url":"https://api.github.com/users/pranavkm/gists{/gist_id}","starred_url":"https://api.github.com/users/pranavkm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pranavkm/subscriptions","organizations_url":"https://api.github.com/users/pranavkm/orgs","repos_url":"https://api.github.com/users/pranavkm/repos","events_url":"https://api.github.com/users/pranavkm/events{/privacy}","received_events_url":"https://api.github.com/users/pranavkm/received_events","type":"User","site_admin":false},"created_at":"2016-04-12T20:56:02Z","updated_at":"2016-04-12T20:56:02Z","body":"You can replace your code `Services.AddSingleton<IConfiguration>(_ => { return Configuration; });` `Services.AddSingleton<IConfiguration>(Configuration);` and the error should go away. Alternatively add the reference in your `project.json` under the `frameworkAssembly` node:` \"frameworkAssemblies\": { \"System.ComponentModel\": \"4.0.0\" }`\r\n.\r\n"}}