You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.
When running MVC without explicitly adding System.Runtime.Serialization.Primitives when running on the .NET CLI you'll get this error:
An unhandled exception has occurred while executing the request
System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime.Serialization.Primitives, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'System.Runtime.Serialization.Primitives, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at Microsoft.AspNet.Mvc.Formatters.Json.Internal.MvcJsonMvcOptionsSetup.<>c__DisplayClass0_0.<.ctor>b__0(MvcOptions options)
at Microsoft.Extensions.Options.OptionsCache`1.CreateOptions()
at System.Threading.LazyInitializer.EnsureInitializedCore[T](T& target, Boolean& initialized, Object& syncLock, Func`1 valueFactory)
at Microsoft.AspNet.Mvc.ApplicationModels.DefaultApplicationModelProvider..ctor(IOptions`1 mvcOptionsAccessor)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ConstructorCallSite.Invoke(ServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.TransientCallSite.Invoke(ServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ClosedIEnumerableService.CallSite.Invoke(ServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.TransientCallSite.Invoke(ServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ConstructorCallSite.Invoke(ServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.TransientCallSite.Invoke(ServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ClosedIEnumerableService.CallSite.Invoke(ServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.TransientCallSite.Invoke(ServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceProviderExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderExtensions.GetRequiredService[T](IServiceProvider provider)
at Microsoft.AspNet.Mvc.Infrastructure.DefaultActionDescriptorCollectionProvider.GetCollection()
at Microsoft.AspNet.Mvc.Infrastructure.DefaultActionDescriptorCollectionProvider.get_ActionDescriptors()
at Microsoft.AspNet.Mvc.Routing.AttributeRoute.GetTreeRouter()
at Microsoft.AspNet.Mvc.Routing.AttributeRoute.RouteAsync(RouteContext context)
at Microsoft.AspNet.Routing.RouteCollection.<RouteAsync>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNet.Builder.RouterMiddleware.<Invoke>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNet.Diagnostics.DeveloperExceptionPageMiddleware.<Invoke>d__7.MoveNext()
It's because of JamesNK/Newtonsoft.Json#618. DNX used to include this assembly so it wasn't needed but now it is. Until we sorta out netstandard and the process for building new style libraries we should add it as a dependency to MVC.Core.
So it looks like we're going to need XDocument as well:
FileNotFoundException: Could not load file or assembly 'System.Xml.XDocument, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
It's all JSON.NET. Hopefully it'll all go away once we're netstandard and JSON.NET is updated to have dependencies listed.
When running MVC without explicitly adding System.Runtime.Serialization.Primitives when running on the .NET CLI you'll get this error:
It's because of JamesNK/Newtonsoft.Json#618. DNX used to include this assembly so it wasn't needed but now it is. Until we sorta out netstandard and the process for building new style libraries we should add it as a dependency to MVC.Core.
/cc @pranavkm @rynowak
The text was updated successfully, but these errors were encountered: