akoeplinger / vagrant-mono-aspnetvnext

Vagrant box for Mono and ASP.NET vNext
18 stars 5 forks source link

Getting an InvalidOperationException when trying to run k web #4

Open brooklynDev opened 9 years ago

brooklynDev commented 9 years ago

Just like in this issue: https://github.com/akoeplinger/vagrant-mono-aspnetvnext/issues?q=is%3Aissue+is%3Aclosed when I try to run k web I get this exception:

System.InvalidOperationException: No service for type 'Microsoft.Framework.DependencyInjection.ServiceLookup.IServiceManifest' has been registered.
  at Microsoft.Framework.DependencyInjection.ServiceProviderExtensions.GetRequiredService (IServiceProvider provider, System.Type serviceType) [0x00000] in <filename unknown>:0
  at Microsoft.Framework.DependencyInjection.ServiceProviderExtensions.GetRequiredService[IServiceManifest] (IServiceProvider provider) [0x00000] in <filename unknown>:0
  at Microsoft.AspNet.Hosting.HostingServices.Import (IServiceProvider fallbackProvider) [0x00000] in <filename unknown>:0
  at Microsoft.AspNet.Hosting.HostingServices.Create (IServiceProvider fallbackServices, IConfiguration configuration) [0x00000] in <filename unknown>:0
  at Microsoft.AspNet.Hosting.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0

I've tried kvm upgrade, I've tried updating mono, but still no luck. Any ideas?

akoeplinger commented 9 years ago

This is almost certainly due to mismatching K runtime and package versions. If you have upgraded the built-in K runtime through kvm upgrade e.g. to beta2, you'll need to ensure you're using beta2 versions of packages like Mvc, SignalR etc too.