MVC本地運行正常,發佈之後報錯 0x80131040

mvc在本地已經運行正常了,發佈之後有一頁出現錯誤,之後在server上直接運行,報錯如下:

 Exception Details: System.IO.FileLoadException: Could not load file or assembly 'System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

錯誤圖片如下:

在網上搜了很多資料,試了很多方法,最終找到了:就是reference項目裏Manage Nuget  Packages,安裝ASP.NET MVC,之後重新發布一次就可以了,所以趕緊記下來,也供其他同學參考


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章