MVC程序一直在正式环境都是正常运行的,最近在更新版本,突然报错了,我在本地win10运行没问题,在云服务器新安装了winserver 2012 r2数据中心版,winserver 2016数据中心版,winserver 2019数据中心版,都是可以的,但在正式环境的winserver 2012 r2数据中心版,客户机的winserver 2012 r2数据标准版,winserver 2016 标准版都是运行报错的。报错的日志如下:
Message: (0): error CS0011: 未能解析程序集“System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”中由类型“System.TupleExtensions”引用的基类或接口“System.Object”
Controller: Analysis
Action: Index
Source: System.Web
Exception: System.Web.HttpCompileException (0x80004005): (0): error CS0011: 未能解析程序集“System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”中由类型“System.TupleExtensions”引用的基类或接口“System.Object” 在 System.Web.Compilation.AssemblyBuilder.Compile() 在 System.Web.Compilation.BuildProvidersCompiler.PerformBuild() 在 System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) 在 System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) 在 System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) 在 System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound) 在 System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) 在 System.Web.WebPages.BuildManagerWrapper.CreateInstanceOfType[T](String virtualPath) 在 System.Web.WebPages.VirtualPathFactoryManager.CreateInstanceOfType[T](String virtualPath) 在 System.Web.WebPages.WebPageBase.CreatePageFromVirtualPath(String virtualPath, HttpContextBase httpContext, Func2 virtualPathExists, DisplayModeProvider displayModeProvider, IDisplayMode displayMode) 在 System.Web.WebPages.WebPageBase.<>c__DisplayClass3.<RenderPageCore>b__2(TextWriter writer) 在 System.Web.WebPages.WebPageBase.Write(HelperResult result) 在 System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action
1 body) 在 System.Web.WebPages.WebPageBase.PopContext() 在 System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) 在 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) 在 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList
1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) 在 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) 在 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList
1 filters, ActionResult actionResult) 在 System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult)
- 新建.net core MVC 视图和控制器项目,运行时services.AddMvc()报错
- webapi dynamic参数问题
- MVC程序部署报错,求解
- 泛型类中的参数又是泛型类该怎么写代码?
- MVC 中如何连接websocket?
看看Framework的版本是否正确
System.Runtime 看你web.config对应配置的版本