Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Nancy + DNX + Mono Error
System.InvalidOperationException: No service for type 'Microsoft.Dnx.Runtime.IApplicationEnvironment' has been registered.
at Microsoft.Framework.DependencyInjection.ServiceProviderExtensions.GetRequiredService (IServiceProvider provider, System.Type serviceType) <0x10bbeb490 + 0x00073> in <filename unknown>:0
at Microsoft.Framework.DependencyInjection.ServiceProviderExtensions.GetRequiredService[T] (IServiceProvider provider) <0x10bbeb410 + 0x00032> in <filename unknown>:0
at Microsoft.AspNet.Hosting.Program.Main (System.String[] args) <0x10bbe9a20 + 0x00125> in <filename unknown>:0
at Microsoft.AspNet.Server.Kestrel.Program.Main (System.String[] args) <0x10bbe9880 + 0x00132> 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) <0x10d61bd80 + 0x000a3> in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x10d471270 + 0x00029> in <filename unknown>:0
at Microsoft.Dnx.Runtime.Common.EntryPointExecutor.Execute (System.Reflection.Assembly assembly, System.String[] args, IServiceProvider serviceProvider) <0x10bbe79d0 + 0x001c8> in <filename unknown>:0
at Microsoft.Dnx.ApplicationHost.Program+<>c__DisplayClass3_0.<ExecuteMain>b__0 () <0x10bbe7560 + 0x0002d> in <filename unknown>:0
at System.Threading.Tasks.Task`1[TResult].InnerInvoke () <0x10d4fae70 + 0x00053> in <filename unknown>:0
at System.Threading.Tasks.Task.Execute () <0x10d50c390 + 0x00055> in <filename unknown>:0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment