我正在开发一个最初在ASP.Net MVC 4 Beta和EF 4.3.1上的单页应用程序.我更新了MVC 4和EF 5的所有NuGet包.现在每当我调用ApiController或DbDataController时,我都会遇到以下异常:
无法从程序集'System.Web.Http,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35'加载类型'System.Web.Http.Controllers.HttpControllerConfigurationAttribute'.
at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)
at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType …Run Code Online (Sandbox Code Playgroud) asp.net asp.net-mvc-4 asp.net-web-api single-page-application