I'm hitting this error when I reach the .Build() in the following code:
public static class Program { public static void Main(string[] args) { //var config = WebHostConfiguration.GetDefault(args); var app = new WebHostBuilder() .UseStartup<Startup>() .Build(); } }
Here is my project.json
{"buildOptions": {"emitEntryPoint": true },"dependencies": {"Microsoft.AspNetCore.Authentication.Cookies": "1.0.0-rc2-final","Microsoft.AspNetCore.Authorization": "1.0.0-rc2-final","Microsoft.AspNetCore.Diagnostics": "1.0.0-rc2-final","Microsoft.AspNetCore.Hosting": "1.0.0-rc2-final","Microsoft.AspNetCore.Hosting.Abstractions": "1.0.0-rc2-final","Microsoft.AspNetCore.Http.Extensions": "1.0.0-rc2-final","Microsoft.AspNetCore.Localization": "1.0.0-rc2-final","Microsoft.AspNetCore.Mvc": "1.0.0-rc2-final","Microsoft.AspNetCore.Mvc.Abstractions": "1.0.0-rc2-final","Microsoft.AspNetCore.Server.Kestrel": "1.0.0","Microsoft.AspNetCore.Session": "1.0.0-rc2-final","Microsoft.AspNetCore.StaticFiles": "1.0.0-rc2-final","Microsoft.Extensions.Caching.SqlServer": "1.0.0-rc2-final","Microsoft.Extensions.Logging.Console": "1.0.0-rc2-final","Microsoft.NETCore.App": {"type": "platform","version": "1.0.0-*" } },"frameworks": {"netcoreapp1.0": {"imports": [ "dnxcore50", "portable-net45+win8" ] } },"runtimes": { "win10-x64": {} } }
As you can see, I'm targeting 1.0.0-rc2-final. This is a "legacy" web application that previously used DNX. I'm trying to migrate it to netcoreapp1.0.
Any ideas would be appreciated! Thanks!