{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/Hosting/issues/801","repository_url":"https://api.github.com/repos/aspnet/Hosting","labels_url":"https://api.github.com/repos/aspnet/Hosting/issues/801/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Hosting/issues/801/comments","events_url":"https://api.github.com/repos/aspnet/Hosting/issues/801/events","html_url":"https://github.com/aspnet/Hosting/issues/801","id":160851585,"number":801,"title":"Missing dependencies when publishing net46 to Azure","user":{"login":"hultqvist","id":505330,"avatar_url":"https://avatars.githubusercontent.com/u/505330?v=3","gravatar_id":"","url":"https://api.github.com/users/hultqvist","html_url":"https://github.com/hultqvist","followers_url":"https://api.github.com/users/hultqvist/followers","following_url":"https://api.github.com/users/hultqvist/following{/other_user}","gists_url":"https://api.github.com/users/hultqvist/gists{/gist_id}","starred_url":"https://api.github.com/users/hultqvist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hultqvist/subscriptions","organizations_url":"https://api.github.com/users/hultqvist/orgs","repos_url":"https://api.github.com/users/hultqvist/repos","events_url":"https://api.github.com/users/hultqvist/events{/privacy}","received_events_url":"https://api.github.com/users/hultqvist/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":22,"created_at":"2016-06-17T09:49:26Z","updated_at":"2016-06-23T17:27:40Z","closed_at":null,"body":"**Steps to reproduce**\r\n\r\nCreate a new dotnet core WebApplication project in Visual Studio 2015.\r\n\r\nModify project.json to only target `net46`:\r\n```\r\n  \"frameworks\": {\r\n    \"net46\": { }\r\n  },\r\n```\r\n\r\n**Result**\r\n\r\nLocally the project worked both in IIS Express and stand-alone.\r\n\r\nThen I published it to a web app in Azure, the result was\r\n\r\n> The specified CGI application encountered an error and the server terminated the process\r\n\r\nWhen logging was activated two exceptions was found.\r\n\r\nFirst one about missing assembly `System.IO.FileSystem.Watcher`, when that was addressed the message below was logged.\r\n\r\n```\r\nUnhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.IO.FileSystem, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.\r\n   at Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String root, PhysicalFilesWatcher physicalFilesWatcher)\r\n   at Microsoft.AspNetCore.Hosting.Internal.HostingEnvironmentExtensions.Initialize(IHostingEnvironment hostingEnvironment, String applicationName, String contentRootPath, WebHostOptions options)\r\n   at Microsoft.AspNetCore.Hosting.WebHostBuilder.BuildHostingServices()\r\n   at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()\r\n   at WebApplication1.Program.Main(String[] args) in C:\\Users\\peter\\DoltWindows\\Documents\\Visual Studio 2015\\Projects\\WebApplication1\\src\\WebApplication1\\Program.cs:line 14\r\n\r\n```\r\n\r\n**Workaround**\r\n\r\nAfter adding dependencies to the two missing files in project.json the published project worked in Azure.\r\n\r\n```\r\n  \"dependencies\": {\r\n    \"Microsoft.AspNetCore.Server.IISIntegration\": \"1.0.0-rc2-final\",\r\n    \"Microsoft.AspNetCore.Server.Kestrel\": \"1.0.0-rc2-final\",\r\n    \"System.IO.FileSystem.Watcher\": \"4.0.0-rc2-24027\",\r\n    \"System.IO.FileSystem\": \"4.0.1-rc2-24027\"\r\n  },\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/aspnet/Hosting/issues/comments/228122002","html_url":"https://github.com/aspnet/Hosting/issues/801#issuecomment-228122002","issue_url":"https://api.github.com/repos/aspnet/Hosting/issues/801","id":228122002,"user":{"login":"moozzyk","id":1438884,"avatar_url":"https://avatars.githubusercontent.com/u/1438884?v=3","gravatar_id":"","url":"https://api.github.com/users/moozzyk","html_url":"https://github.com/moozzyk","followers_url":"https://api.github.com/users/moozzyk/followers","following_url":"https://api.github.com/users/moozzyk/following{/other_user}","gists_url":"https://api.github.com/users/moozzyk/gists{/gist_id}","starred_url":"https://api.github.com/users/moozzyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moozzyk/subscriptions","organizations_url":"https://api.github.com/users/moozzyk/orgs","repos_url":"https://api.github.com/users/moozzyk/repos","events_url":"https://api.github.com/users/moozzyk/events{/privacy}","received_events_url":"https://api.github.com/users/moozzyk/received_events","type":"User","site_admin":false},"created_at":"2016-06-23T17:27:40Z","updated_at":"2016-06-23T17:27:40Z","body":"I can imagine that you may want to target net46 if the application is using APIs not available in .NET Core. As for the application - I just installed the latest (yetserday's) version of the tooling created a web app from the template and deployed it to an existing website I had. "}}
{"actor":{"display_login":"moozzyk"}}