'Get' in type Kestrel.Http.Frame does not have an implementation error on startup
I know whenever someone says "nothing changed" we all roll our eyes, so I'm sure that isn't the case, but yesterday afternoon I started getting the error below after updating some classes and viewmodels.
I've gone back in source control to the last two checkins previous, both of which were working fine prior to yesterday afternoon and they both fail too. I've checked my project.json file, but none of the nuget packages have changed for at least a week, which was the first thing I thought of.
System.Reflection.ReflectionTypeLoadException was unhandled by user code
HResult=-2146232830
Message=Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
Source=mscorlib
StackTrace:
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeAssembly.get_DefinedTypes()
at Microsoft.AspNet.Hosting.Server.ServerLoader.LoadServerFactory(String assemblyName)
at Microsoft.AspNet.Hosting.Internal.WebApplication.EnsureServer()
at Microsoft.AspNet.Hosting.Internal.WebApplication.BuildApplication()
at Microsoft.AspNet.Hosting.Internal.WebApplication.Initialize()
at Microsoft.AspNet.Hosting.WebApplicationBuilder.Build()
at Revelar.Startup.Main(String[] args) in c:\code\RevelarPortalSolution\src\RevelarMVC\Startup.cs:line 120
InnerException:
#LOADER EXCEPTION#
{"Method 'Get' in type 'Microsoft.AspNet.Server.Kestrel.Http.Frame`1' from assembly 'Microsoft.AspNet.Server.Kestrel, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an implementation.":"Microsoft.AspNet.Server.Kestrel.Http.Frame`1"}
This occurs on the Startup Main
// RC2 Version - Entry point for the application.
public static void Main(string[] args)
{
var application = new WebApplicationBuilder()
.UseConfiguration(WebApplicationConfiguration.GetDefault(args))
.UseStartup<Startup>()
.Build();
application.Run();
}
project.json
{
"commands": {
"web": "RevelarMVC",
"ef": "EntityFramework.Commands"
},
"compilationOptions": {
"emitEntryPoint": true
},
"dependencies": {
"EntityFramework.Commands": "7.0.0-rc2-16649",
"EntityFramework.MicrosoftSqlServer": "7.0.0-rc2-16649",
"Microsoft.AspNet.Authentication.Cookies": "1.0.0-rc2-16216",
"Microsoft.AspNet.Diagnostics.Entity": "7.0.0-rc2-16405",
"Microsoft.AspNet.Identity.EntityFramework": "3.0.0-rc2-16304",
"Microsoft.AspNet.Mvc": "6.0.0-rc2-16770",
"Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-rc2-16770",
"Microsoft.AspNet.Hosting": "1.0.0-*",
"Microsoft.AspNet.Server.Kestrel": "1.0.0-rc2-16236",
"Microsoft.AspNet.StaticFiles": "1.0.0-rc2-16107",
"Microsoft.AspNet.Tooling.Razor": "1.0.0-rc2-16051",
"Microsoft.Extensions.CodeGenerators.Mvc": "1.0.0-rc2-16221",
"Microsoft.Extensions.Configuration.FileProviderExtensions": "1.0.0-rc2-15952",
"Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-15952",
"Microsoft.Extensions.Configuration.UserSecrets": "1.0.0-rc2-15948",
"Microsoft.Extensions.Logging": "1.0.0-rc2-15958",
"Microsoft.Extensions.Logging.Console": "1.0.0-rc2-15958",
"Microsoft.Extensions.Logging.Debug": "1.0.0-rc2-15958",
"Microsoft.Extensions.PlatformAbstractions": "1.0.0-rc2-16530",
"Microsoft.Framework.DependencyInjection.Abstractions": "1.0.0-rc1-15644",
"Microsoft.Framework.OptionsModel": "1.0.0-rc1-15642",
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-rc2-16226",
"System.ComponentModel.Annotations": "4.1.0-rc2-23623",
"Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc2-16069",
"Microsoft.AspNet.Server.Kestrel.Https": "1.0.0-rc2-16236"
},
"frameworks": {
"dnx451": { }
},
"exclude": [
"wwwroot",
"node_modules"
],
"publishExclude": [
"**.user",
"**.vspscc"
],
"scripts": {
"prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ]
},
"userSecretsId": "aspnet5-WebApplication1-167835da-fd4b-498e-958f-a8c586dbf38d",
"version": "1.0.0-*"
}
hosting.json
{
"server": "Microsoft.AspNet.Server.Kestrel",
"environment": "Development",
"detailedErrors": true
}
Doesn't matter if I run with "web" or "IISExpress" project file is set to use 1.0.0-rc2-16312
I also tried updating the DI and OptionsModel packages to rc2 in the Microsoft.Extensions namespace which is where it looks like they've moved. That didn't help - and since the error is specific to Kestrel and it has been working for the last week as-is I didn't expect it to.
Any ideas?
I was able to fix this by uninstalling the Kestrel package and then reloading it with "Dependency Behavior - Highest Patch" checked in nuget package manager. This updated the Microsoft.AspNet.Hosting package to rc2-16161 rather than -16150 that was specified as the minimum.
So this issue can be closed, but would first appreciate a comment on if the aspnet team thinks we should be using "highest patch" or "lowest" for dependency behavior in nuget when working with this bleeding edge rc2 stuff? Lowest has always worked up until now.
We use 1.0.0-* dependencies for all of our RC2 work and you may need to as well if you're updating often.
thanks