{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/Home/issues/1394","repository_url":"https://api.github.com/repos/aspnet/Home","labels_url":"https://api.github.com/repos/aspnet/Home/issues/1394/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Home/issues/1394/comments","events_url":"https://api.github.com/repos/aspnet/Home/issues/1394/events","html_url":"https://github.com/aspnet/Home/issues/1394","id":149557268,"number":1394,"title":"ASP.NET Core RC2 Nightly Builds System.IO.FileNotFoundException error","user":{"login":"yogiderek","id":2614368,"avatar_url":"https://avatars.githubusercontent.com/u/2614368?v=3","gravatar_id":"","url":"https://api.github.com/users/yogiderek","html_url":"https://github.com/yogiderek","followers_url":"https://api.github.com/users/yogiderek/followers","following_url":"https://api.github.com/users/yogiderek/following{/other_user}","gists_url":"https://api.github.com/users/yogiderek/gists{/gist_id}","starred_url":"https://api.github.com/users/yogiderek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yogiderek/subscriptions","organizations_url":"https://api.github.com/users/yogiderek/orgs","repos_url":"https://api.github.com/users/yogiderek/repos","events_url":"https://api.github.com/users/yogiderek/events{/privacy}","received_events_url":"https://api.github.com/users/yogiderek/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-19T19:25:50Z","updated_at":"2016-04-20T21:34:41Z","closed_at":null,"body":"I am migrating a working MVC6 EF7 website to ASP.Net Core 1.0 using the aspnetcidev nightly builds feed (My first ever ASP.Net project). When i execute dotnet run, I get the following exception at Configuration = builder.Build() in the Startup constructor. Appsettings.json exists in the bin\\Debug\\netcoreapp1.0 folder. \r\n\r\nI have included startup.cs, dotnet --info output and project.json\r\n\r\nAny thoughts on what the problem may be?\r\n\r\n```\r\nApplication startup exception: System.IO.FileNotFoundException: Could not load file or assembly 'System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or one of its dependencies. The system cannot find the file specified.\r\nFile name: 'System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes'\r\n   at Microsoft.Extensions.Configuration.Json.JsonConfigurationFileParser.Parse(Stream input)\r\n   at Microsoft.Extensions.Configuration.Json.JsonConfigurationProvider.Load(Stream stream)\r\n   at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load()\r\n   at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()\r\n   at AnahataYogaWebsite.Startup..ctor(IHostingEnvironment env)\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.Extensions.Internal.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider)\r\n   at Microsoft.Extensions.Internal.ActivatorUtilities.CreateInstance(IServiceProvider provider, Type instanceType, Object[] parameters)\r\n   at Microsoft.Extensions.Internal.ActivatorUtilities.GetServiceOrCreateInstance(IServiceProvider provider, Type type)\r\n   at Microsoft.AspNetCore.Hosting.Internal.StartupLoader.LoadMethods(IServiceProvider services, Type startupType, String environmentName)\r\n   at Microsoft.AspNetCore.Hosting.WebHostBuilderExtensions.<>c__DisplayClass6_0.<UseStartup>b__1(IServiceProvider sp)\r\n   at Microsoft.Extensions.DependencyInjection.ServiceLookup.FactoryService.Invoke(ServiceProvider provider)\r\n   at Microsoft.Extensions.DependencyInjection.ServiceProvider.ScopedCallSite.Invoke(ServiceProvider provider)\r\n   at Microsoft.Extensions.DependencyInjection.ServiceProvider.SingletonCallSite.Invoke(ServiceProvider provider)\r\n   at Microsoft.Extensions.DependencyInjection.ServiceProvider.<>c__DisplayClass12_0.<RealizeService>b__0(ServiceProvider provider)\r\n   at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType)\r\n   at Microsoft.Extensions.DependencyInjection.ServiceProviderExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)\r\n   at Microsoft.Extensions.DependencyInjection.ServiceProviderExtensions.GetRequiredService[T](IServiceProvider provider)\r\n   at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureStartup()\r\n   at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices()\r\n   at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()\r\n\r\n------------------------------------------------------------------------\t \r\ndotnet --info\r\n.NET Command Line Tools (1.0.0-rc2-002426)\r\n\r\nProduct Information:\r\n Version:     1.0.0-rc2-002426\r\n Commit Sha:  08ee6dedd9\r\n\r\nRuntime Environment:\r\n OS Name:     Windows\r\n OS Version:  10.0.10586\r\n OS Platform: Windows\r\n RID:         win10-x64\r\n\r\n----------------------------------------------------------------------------\r\n \r\npublic class Startup\r\n{\r\n\tpublic Startup(IHostingEnvironment env)\r\n\t{\r\n\t\t// Set up configuration sources.\r\n\t\tvar builder = new ConfigurationBuilder()\r\n\t\t\t\t\t\t.SetBasePath(Directory.GetCurrentDirectory())\r\n\t\t\t\t\t\t.AddJsonFile(\"appsettings.json\")\r\n\t\t\t\t\t\t.AddJsonFile($\"appsettings.{env.EnvironmentName}.json\", optional: true)\r\n\t\t\t\t\t\t.AddEnvironmentVariables();\r\n\r\n\t\tif (env.IsDevelopment())\r\n\t\t{\r\n\t\t\t// For more details on using the user secret store see http://go.microsoft.com/fwlink/?LinkID=532709\r\n\t\t\t//builder.AddUserSecrets();\r\n\t\t}\r\n\t\tConfiguration = builder.Build();\r\n\t}\r\n\r\n\tpublic IConfigurationRoot Configuration { get; set; }\r\n\r\n\t// This method gets called by the runtime. Use this method to add services to the container.\r\n\tpublic void ConfigureServices(IServiceCollection services)\r\n\t{\r\n\t\t// Add framework services.\r\n\t\tservices.AddEntityFramework()\r\n\t\t\t\t\t\t.AddEntityFrameworkSqlServer()\r\n\t\t\t\t\t\t.AddDbContext<ApplicationDbContext>(options =>\r\n\t\t\t\t\t\t\t\toptions.UseSqlServer(Configuration[\"Data:DefaultConnection:ConnectionString\"]));\r\n\r\n\t\tservices.AddIdentity<ApplicationUser, IdentityRole>()\r\n\t\t\t\t\t\t.AddEntityFrameworkStores<ApplicationDbContext>()\r\n\t\t\t\t\t\t.AddDefaultTokenProviders();\r\n\r\n\t\tservices.AddMvc();\r\n\r\n\t\t// Add application services.\r\n\t\tservices.AddTransient<IEmailSender, AuthMessageSender>();\r\n\t\tservices.AddTransient<ISmsSender, AuthMessageSender>();\r\n\t}\r\n\r\n\t// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.\r\n\tpublic void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)\r\n\t{\r\n\t\tloggerFactory.AddConsole(Configuration.GetSection(\"Logging\"));\r\n\t\tloggerFactory.AddDebug();\r\n\r\n\t\tif (env.IsDevelopment())\r\n\t\t{\r\n//                app.UseBrowserLink();\r\n\t\t\tapp.UseDeveloperExceptionPage();\r\n\t\t\tapp.UseDatabaseErrorPage();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tapp.UseExceptionHandler(\"/Home/Error\");\r\n\r\n\t\t\t// For more details on creating database during deployment see http://go.microsoft.com/fwlink/?LinkID=615859\r\n\t\t\ttry\r\n\t\t\t{\r\n/*\r\n\t\t\t\tusing (var serviceScope = app.ApplicationServices.GetRequiredService<IServiceScopeFactory>()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.CreateScope())\r\n\t\t\t\t{\r\n\t\t\t\t\t\t\t\tserviceScope.ServiceProvider.GetService<ApplicationDbContext>()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.Database.Migrate();\r\n\t\t\t\t}\r\n*/\r\n\t\t\t\t\t}\r\n\t\t\tcatch { }\r\n\t\t}\r\n\r\n\t\tapp.UseStaticFiles();\r\n\r\n\t\tapp.UseIdentity();\r\n\r\n\t\t// To configure external authentication please see http://go.microsoft.com/fwlink/?LinkID=532715\r\n\t\t\t\r\n\t\tapp.UseMvc(routes =>\r\n\t\t{\r\n\t\t\troutes.MapRoute(\r\n\t\t\t\t\tname: \"default\",\r\n\t\t\t\t\ttemplate: \"{controller=Home}/{action=Index}/{id?}\");\r\n\t\t});\r\n\t}\r\n\r\n\t// Entry point for the application.\r\n\tpublic static void Main(string[] args)\r\n\t{\r\n\t\tvar host = new WebHostBuilder()\r\n\t\t\t\t\t\t.UseKestrel()\r\n\t\t\t\t\t\t.UseContentRoot(Directory.GetCurrentDirectory())\r\n\t\t\t\t\t\t.CaptureStartupErrors(true)\r\n\t\t\t\t\t\t.UseDefaultHostingConfiguration(args)\r\n\t\t\t\t\t\t.UseIISIntegration()\r\n\t\t\t\t\t\t.UseStartup<Startup>()\r\n\t\t\t\t\t\t.Build();\r\n\r\n\t\thost.Run();\r\n\t}\r\n}\r\n\r\n----------------------------------------------------------------------------\r\n\r\n{\r\n\t\"userSecretsId\": \"aspnet5-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\r\n\t\"version\": \"1.0.0-*\",\r\n\t\"compilationOptions\": {\r\n\t\"emitEntryPoint\": true,\r\n     \"debugType\": \"portable\"\r\n},\r\n\r\n\t\"dependencies\": {\r\n\t\t\"Microsoft.AspNetCore.Authentication.Cookies\": \"1.0.0-*\",\r\n\t\t\"Microsoft.AspNetCore.Cors\": \"1.0.0-*\",\r\n\t\t\"Microsoft.AspNetCore.Diagnostics\": \"1.0.0-*\",\r\n\t\t\"Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore\": \"1.0.0-*\",\r\n\t\t\"Microsoft.AspNetCore.Hosting.Abstractions\": \"1.0.0-*\",\r\n\t\t\"Microsoft.AspNetCore.Http\": \"1.0.0-*\",\r\n\t\t\"Microsoft.AspNetCore.Http.Extensions\": \"1.0.0-*\",\r\n\t\t\"Microsoft.AspNetCore.Identity\": \"1.0.0-*\",\r\n\t\t\"Microsoft.AspNetCore.Identity.EntityFrameworkCore\": \"1.0.0-*\",\r\n\t\t\"Microsoft.AspNetCore.Localization\": \"1.0.0-*\",\r\n\t\t\"Microsoft.AspNetCore.Mvc\": \"1.0.0-*\",\r\n\t\t\"Microsoft.AspNetCore.Mvc.ApiExplorer\": \"1.0.0-*\",\r\n\t\t\"Microsoft.AspNetCore.Mvc.Core\": \"1.0.0-*\",\r\n\t\t\"Microsoft.AspNetCore.Mvc.Cors\": \"1.0.0-*\",\r\n\t\t\"Microsoft.AspNetCore.Mvc.DataAnnotations\": \"1.0.0-*\",\r\n\t\t\"Microsoft.AspNetCore.Mvc.Localization\": \"1.0.0-*\",\r\n\t\t\"Microsoft.AspNetCore.Mvc.Razor\": \"1.0.0-*\",\r\n\t\t\"Microsoft.AspNetCore.Mvc.TagHelpers\": \"1.0.0-*\",\r\n\t\t\"Microsoft.AspNetCore.Mvc.ViewFeatures\": \"1.0.0-*\",\r\n\t\t\"Microsoft.AspNetCore.Server.Kestrel\": \"1.0.0-*\",\r\n\t\t\"Microsoft.AspNetCore.Server.IISIntegration\": \"1.0.0-*\",\r\n\t\t\"Microsoft.AspNetCore.StaticFiles\": \"1.0.0-*\",\r\n\t\t\"Microsoft.EntityFrameworkCore\": \"1.0.0-*\",\r\n\t\t\"Microsoft.EntityFrameworkCore.Commands\": \"1.0.0-*\",\r\n\t\t\"Microsoft.EntityFrameworkCore.Relational\": \"1.0.0-*\",\r\n\t\t\"Microsoft.EntityFrameworkCore.Relational.Design\": \"1.0.0-*\",\r\n\t\t\"Microsoft.EntityFrameworkCore.SqlServer\": \"1.0.0-*\",\r\n\t\t\"Microsoft.EntityFrameworkCore.SqlServer.Design\": \"1.0.0-*\",\r\n\t\t\"Microsoft.Extensions.Caching.Memory\": \"1.0.0-*\",\r\n\t\t\"Microsoft.Extensions.Configuration\": \"1.0.0-*\",\r\n\t\t\"Microsoft.Extensions.Configuration.FileProviderExtensions\": \"1.0.0-*\",\r\n\t\t\"Microsoft.Extensions.Configuration.Json\": \"1.0.0-*\",\r\n\t\t\"Microsoft.Extensions.Configuration.UserSecrets\": \"1.0.0-*\",\r\n\t\t\"Microsoft.Extensions.DependencyInjection\": \"1.0.0-*\",\r\n\t\t\"Microsoft.Extensions.Localization\": \"1.0.0-*\",\r\n\t\t\"Microsoft.Extensions.Logging\": \"1.0.0-*\",\r\n\t\t\"Microsoft.Extensions.Logging.Console\": \"1.0.0-*\",\r\n\t\t\"Microsoft.Extensions.Logging.Debug\": \"1.0.0-*\",\r\n\t\t\"Microsoft.NETCore.App\": {\r\n\t\t\t\"type\": \"platform\",\r\n\t\t\t\"version\": \"1.0.0-rc2-*\"\r\n\t\t}\r\n\t},\r\n\r\n\t\"commands\": {\r\n\t\t\"web\": \"Microsoft.AspNetCore.Server.Kestrel --server.urls http://localhost:5000\",\r\n\t\t\"ef\": \"EntityFramework.Commands\"\r\n\t},\r\n\r\n\t\"frameworks\": {\r\n\t\t\"netcoreapp1.0\": {\r\n\t\t\t\"dependencies\" : {},\r\n\t\t\t\"imports\": [\r\n\t\t\t\t\"portable-net45+win8+wp8\"\r\n\t\t\t]\r\n\t\t}\r\n\t},\r\n\t\"content\": [\r\n\t\t\"wwwroot\",\r\n\t\t\"Views\",\r\n\t\t\"web.config\",\r\n \t    \"appsettings.json\"\r\n\t],\r\n\t\"exclude\": [\r\n\t\t\"wwwroot\",\r\n\t\t\"node_modules\"\r\n\t],\r\n\t\"publishExclude\": [\r\n\t\t\"**.user\",\r\n\t\t\"**.vspscc\"\r\n\t],\r\n\t\"scripts\": {\r\n\t\t\"prepublish\": [ \"npm install\", \"bower install\", \"gulp clean\" ]\r\n\t} \r\n\r\n}\r\n\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/aspnet/Home/issues/comments/212616713","html_url":"https://github.com/aspnet/Home/issues/1394#issuecomment-212616713","issue_url":"https://api.github.com/repos/aspnet/Home/issues/1394","id":212616713,"user":{"login":"yogiderek","id":2614368,"avatar_url":"https://avatars.githubusercontent.com/u/2614368?v=3","gravatar_id":"","url":"https://api.github.com/users/yogiderek","html_url":"https://github.com/yogiderek","followers_url":"https://api.github.com/users/yogiderek/followers","following_url":"https://api.github.com/users/yogiderek/following{/other_user}","gists_url":"https://api.github.com/users/yogiderek/gists{/gist_id}","starred_url":"https://api.github.com/users/yogiderek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yogiderek/subscriptions","organizations_url":"https://api.github.com/users/yogiderek/orgs","repos_url":"https://api.github.com/users/yogiderek/repos","events_url":"https://api.github.com/users/yogiderek/events{/privacy}","received_events_url":"https://api.github.com/users/yogiderek/received_events","type":"User","site_admin":false},"created_at":"2016-04-20T21:34:41Z","updated_at":"2016-04-20T21:34:41Z","body":"Fixed the IsSignedIn/GetUserName problem as shown below. Just the varchar issue to clear\r\n\r\n```\r\n@using Microsoft.AspNetCore.Identity\r\n\r\n@inject SignInManager<ApplicationUser> SignInManager\r\n@inject UserManager<ApplicationUser> UserManager\r\n\r\n@if (SignInManager.IsSignedIn(User)) {\r\n\t<form asp-controller=\"Account\" asp-action=\"LogOff\" method=\"post\" id=\"logoutForm\" class=\"float-right\">\r\n\t\t<ul class=\"dropdown menu\" data-dropdown-menu>\r\n\t\t\t<li>\r\n\t\t\t\t<a class=\"title\">@UserManager.GetUserName(User)</a>\r\n```"}}