{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/Home/issues/557","labels_url":"https://api.github.com/repos/aspnet/Home/issues/557/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Home/issues/557/comments","events_url":"https://api.github.com/repos/aspnet/Home/issues/557/events","html_url":"https://github.com/aspnet/Home/issues/557","id":73177657,"number":557,"title":"Fail to run sample: No service for type 'Microsoft.Framework.Runtime.IApplication....\"","user":{"login":"olegsomphane","id":2441440,"avatar_url":"https://avatars.githubusercontent.com/u/2441440?v=3","gravatar_id":"","url":"https://api.github.com/users/olegsomphane","html_url":"https://github.com/olegsomphane","followers_url":"https://api.github.com/users/olegsomphane/followers","following_url":"https://api.github.com/users/olegsomphane/following{/other_user}","gists_url":"https://api.github.com/users/olegsomphane/gists{/gist_id}","starred_url":"https://api.github.com/users/olegsomphane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olegsomphane/subscriptions","organizations_url":"https://api.github.com/users/olegsomphane/orgs","repos_url":"https://api.github.com/users/olegsomphane/repos","events_url":"https://api.github.com/users/olegsomphane/events{/privacy}","received_events_url":"https://api.github.com/users/olegsomphane/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":22,"created_at":"2015-05-05T01:58:12Z","updated_at":"2015-06-22T14:27:27Z","closed_at":"2015-05-05T17:37:13Z","body":"Hello, I am getting an error when I try to run the sample projects with the dnx dev branch. Can anyone see if I am doing something wrong?\r\n\r\nHost: Windows 7 64-bit SP1 with .NET 4.5 and PS 4\r\n\r\nC:\\Users\\Admin>@powershell -NoProfile -ExecutionPolicy unrestricted -Command \"&{$Branch='dev';iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))}\"\r\n```\r\nUsing temporary directory: C:\\Users\\Admin\\AppData\\Local\\Temp\\dnvminstall\r\nDownloading DNVM.ps1 to\r\nDownloading DNVM.cmd to\r\nInstalling DNVM\r\nInstalling .NET Version Manager to C:\\Users\\Admin\\.dnx\\bin\r\nCreating destination folder 'C:\\Users\\Admin\\.dnx\\bin' ...\r\nInstalling 'dnvm.ps1' to 'C:\\Users\\Admin\\.dnx\\bin' ...\r\nInstalling 'dnvm.cmd' to 'C:\\Users\\Admin\\.dnx\\bin' ...\r\nAdding C:\\Users\\Admin\\.dnx\\bin to Process PATH\r\nAdding C:\\Users\\Admin\\.dnx\\bin to User PATH\r\nAdding C:\\Users\\Admin\\.dnx to Process DNX_HOME\r\nAdding C:\\Users\\Admin\\.dnx to User DNX_HOME\r\n```\r\n\r\nC:\\Users\\Admin>dnvm upgrade\r\n```\r\nDetermining latest version\r\nDownloading dnx-clr-win-x86.1.0.0-beta4 from https://www.nuget.org/api/v2\r\nInstalling to C:\\Users\\Admin\\.dnx\\runtimes\\dnx-clr-win-x86.1.0.0-beta4\r\nAdding C:\\Users\\Admin\\.dnx\\runtimes\\dnx-clr-win-x86.1.0.0-beta4\\bin to process PATH\r\nAdding C:\\Users\\Admin\\.dnx\\runtimes\\dnx-clr-win-x86.1.0.0-beta4\\bin to user PATH\r\nNative image generation (ngen) is skipped. Include -Ngen switch to turn on native image generation to improve application startup time.\r\nSetting alias 'default' to 'dnx-clr-win-x86.1.0.0-beta4'\r\n```\r\n\r\nc:\\>dnvm upgrade -u\r\n```\r\nDetermining latest version\r\nDownloading dnx-clr-win-x86.1.0.0-beta5-11682 from https://www.myget.org/F/aspnetvnext/api/v2\r\nInstalling to C:\\Users\\Admin\\.dnx\\runtimes\\dnx-clr-win-x86.1.0.0-beta5-11682\r\nAdding C:\\Users\\Admin\\.dnx\\runtimes\\dnx-clr-win-x86.1.0.0-beta5-11682\\bin to process PATH\r\nAdding C:\\Users\\Admin\\.dnx\\runtimes\\dnx-clr-win-x86.1.0.0-beta5-11682\\bin to user PATH\r\nNative image generation (ngen) is skipped. Include -Ngen switch to turn on native image generation to improve application startup time.\r\nUpdating alias 'default' to 'dnx-clr-win-x86.1.0.0-beta5-11682'\r\n```\r\n\r\nc:\\>mkdir test2\r\nc:\\>cd test2\r\nc:\\test2>git clone http://github.com/aspnet/home\r\n* Clones correctly (no errors)*\r\n\r\nc:\\test2>dnu restore\r\n* Restores correctly (no errors)*\r\n\r\nc:\\test2\\home\\samples\\latest\\HelloMvc>dnx . web\r\n```\r\nSystem.InvalidOperationException: No service for type 'Microsoft.Framework.Runtime.IApplicationEnvironment' has been registered.\r\n   at Microsoft.Framework.DependencyInjection.ServiceProviderExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)\r\n   at Microsoft.Framework.DependencyInjection.ServiceProviderExtensions.GetRequiredService[T](IServiceProvider provider)\r\n   at Microsoft.AspNet.Hosting.HostingEngine..ctor(IServiceProvider fallbackServices)\r\n   at Microsoft.AspNet.Hosting.Program.Main(String[] args)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at Microsoft.Framework.Runtime.Common.EntryPointExecutor.Execute(Assembly assembly, String[] args, IServiceProvider serviceProvider)\r\n   at Microsoft.Framework.ApplicationHost.Program.ExecuteMain(DefaultHost host, String applicationName, String[] args)\r\n   at Microsoft.Framework.ApplicationHost.Program.Main(String[] args)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at Microsoft.Framework.Runtime.Common.EntryPointExecutor.Execute(Assembly assembly, String[] args, IServiceProvider serviceProvider)\r\n   at dnx.host.Bootstrapper.RunAsync(List`1 args)\r\n   at dnx.host.RuntimeBootstrapper.ExecuteAsync(String[] args)\r\n   at dnx.host.RuntimeBootstrapper.Execute(String[] args)\r\n```"},"comment":{"url":"https://api.github.com/repos/aspnet/Home/issues/comments/114127998","html_url":"https://github.com/aspnet/Home/issues/557#issuecomment-114127998","issue_url":"https://api.github.com/repos/aspnet/Home/issues/557","id":114127998,"user":{"login":"back5576","id":3430790,"avatar_url":"https://avatars.githubusercontent.com/u/3430790?v=3","gravatar_id":"","url":"https://api.github.com/users/back5576","html_url":"https://github.com/back5576","followers_url":"https://api.github.com/users/back5576/followers","following_url":"https://api.github.com/users/back5576/following{/other_user}","gists_url":"https://api.github.com/users/back5576/gists{/gist_id}","starred_url":"https://api.github.com/users/back5576/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/back5576/subscriptions","organizations_url":"https://api.github.com/users/back5576/orgs","repos_url":"https://api.github.com/users/back5576/repos","events_url":"https://api.github.com/users/back5576/events{/privacy}","received_events_url":"https://api.github.com/users/back5576/received_events","type":"User","site_admin":false},"created_at":"2015-06-22T14:27:27Z","updated_at":"2015-06-22T14:27:27Z","body":"Better yet, make it real with an example. Create a scenario were you are getting a \"Could not load type 'Microsoft.AspNet.Builder.IServerInformation' from assembly 'Microsoft.AspNet.Http\" or \"No service for type 'Microsoft.Framework.Runtime.IApplicationEnvironment' has been registered.\" error, and then show what you change in order to fix it. For developers trying to learn ASP.NET 5, hearing \"don't cross streams\" really isn't very actionable.\r\n"}}