未能加載檔案或程式集“System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”或它的某一個依賴項。系統找不到指定的檔案。
說明: 執行當前 Web 請求期間,出現未經處理的例外。請檢查堆疊跟蹤資訊,以了解有關該錯誤以及代碼中導致錯誤的出處的詳細資訊。
例外詳細資訊: System.IO.FileNotFoundException: 未能加載檔案或程式集“System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”或它的某一個依賴項。系統找不到指定的檔案。
源錯誤:
執行當前 Web 請求期間生成了未經處理的例外。可以使用下面的例外堆疊跟蹤資訊確定有關例外原因和發生位置的資訊。
程式集加載跟蹤: 下列資訊有助于確定程式集“System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”未能加載的原因。
=== 預系結狀態資訊 ===
日志: DisplayName = System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
日志: Appbase = file:///C:/Users/DELL/Desktop/BrnShop/Presentation/BrnShop.Web/
日志: 初始 PrivatePath = C:\Users\DELL\Desktop\BrnShop\Presentation\BrnShop.Web\bin
呼叫程式集: System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35。
===
日志: 此系結從 default 加載背景關系開始。
日志: 正在使用應用程式組態檔: C:\Users\DELL\Desktop\BrnShop\Presentation\BrnShop.Web\web.config
日志: 使用主機組態檔: C:\Users\DELL\Documents\IISExpress\config\aspnet.config
日志: 使用 C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config 的計算機組態檔。
日志: 在應用程式組態檔中找到重定向: 2.0.0.0 已重定向到 3.0.0.0。
日志: 策略后參考: System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
日志: 嘗試下載新的 URL file:///C:/Users/DELL/AppData/Local/Temp/Temporary ASP.NET Files/root/d4eed1fb/43ac9b32/System.Web.WebPages.Razor.DLL。
日志: 嘗試下載新的 URL file:///C:/Users/DELL/AppData/Local/Temp/Temporary ASP.NET Files/root/d4eed1fb/43ac9b32/System.Web.WebPages.Razor/System.Web.WebPages.Razor.DLL。
日志: 嘗試下載新的 URL file:///C:/Users/DELL/Desktop/BrnShop/Presentation/BrnShop.Web/bin/System.Web.WebPages.Razor.DLL。
日志: 嘗試下載新的 URL file:///C:/Users/DELL/Desktop/BrnShop/Presentation/BrnShop.Web/bin/System.Web.WebPages.Razor/System.Web.WebPages.Razor.DLL。
日志: 嘗試下載新的 URL file:///C:/Users/DELL/Desktop/BrnShop/Presentation/BrnShop.Web/plugins/bin/System.Web.WebPages.Razor.DLL。
日志: 嘗試下載新的 URL file:///C:/Users/DELL/Desktop/BrnShop/Presentation/BrnShop.Web/plugins/bin/System.Web.WebPages.Razor/System.Web.WebPages.Razor.DLL。
日志: 嘗試下載新的 URL file:///C:/Users/DELL/AppData/Local/Temp/Temporary ASP.NET Files/root/d4eed1fb/43ac9b32/System.Web.WebPages.Razor.EXE。
日志: 嘗試下載新的 URL file:///C:/Users/DELL/AppData/Local/Temp/Temporary ASP.NET Files/root/d4eed1fb/43ac9b32/System.Web.WebPages.Razor/System.Web.WebPages.Razor.EXE。
日志: 嘗試下載新的 URL file:///C:/Users/DELL/Desktop/BrnShop/Presentation/BrnShop.Web/bin/System.Web.WebPages.Razor.EXE。
日志: 嘗試下載新的 URL file:///C:/Users/DELL/Desktop/BrnShop/Presentation/BrnShop.Web/bin/System.Web.WebPages.Razor/System.Web.WebPages.Razor.EXE。
日志: 嘗試下載新的 URL file:///C:/Users/DELL/Desktop/BrnShop/Presentation/BrnShop.Web/plugins/bin/System.Web.WebPages.Razor.EXE。
日志: 嘗試下載新的 URL file:///C:/Users/DELL/Desktop/BrnShop/Presentation/BrnShop.Web/plugins/bin/System.Web.WebPages.Razor/System.Web.WebPages.Razor.EXE。
堆疊跟蹤:
[FileNotFoundException: 未能加載檔案或程式集“System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”或它的某一個依賴項。系統找不到指定的檔案。]
[FileNotFoundException: 未能加載檔案或程式集“System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”或它的某一個依賴項。系統找不到指定的檔案。]
System.Web.Mvc.PreApplicationStartCode.Start() +0
[InvalidOperationException: 針對型別 System.Web.Mvc.PreApplicationStartCode 的應用程式預啟動初始化方法 Start 引發了例外,顯示下列錯誤訊息: 未能加載檔案或程式集“System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”或它的某一個依賴項。系統找不到指定的檔案。。]
System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection`1 methods, Func`1 setHostingEnvironmentCultures) +615
System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) +141
System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +102
System.Web.Compilation.BuildManager.ExecutePreAppStart() +157
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +549
[HttpException (0x80004005): 針對型別 System.Web.Mvc.PreApplicationStartCode 的應用程式預啟動初始化方法 Start 引發了例外,顯示下列錯誤訊息: 未能加載檔案或程式集“System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”或它的某一個依賴項。系統找不到指定的檔案。。]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +10074716
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +95
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
版本資訊: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.7.3429.0
uj5u.com熱心網友回復:
https://blog.csdn.net/u010675860/article/details/81179014uj5u.com熱心網友回復:
打開nuget管理包,更新下uj5u.com熱心網友回復:
今天突然間好了uj5u.com熱心網友回復:
哈哈哈,有可能就是系統錯誤了,重啟就好了
uj5u.com熱心網友回復:
是的,昨天整了一天今天突然就自己好了,有時候很郁悶
uj5u.com熱心網友回復:
先看webconfig 再看nuget有可能是config中的版本與參考版本不一致導致的,我前幾天就是這個錯誤
uj5u.com熱心網友回復:
是否是 誤升級了 MVC 的版本。轉載請註明出處,本文鏈接:https://www.uj5u.com/net/127364.html
標籤:ASP.NET
上一篇:哪位大哥幫幫忙寫出這個代碼
