我已經開發了使用實體框架5的項目。我創建了實體類的對象。它工作正常,我的本地機器上,但是當我試圖在我的服務器的機器上運行它給我一個錯誤服務器機器上的程序集引用異常。本地運行良好
Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0246: The type or namespace name 'DataExportSystemEntities' could not be found (are you missing a using directive or an assembly reference?)
Source Error:
Line 11: public partial class Servers : System.Web.UI.Page
Line 12: {
Line 13: DataExportSystemEntities db = new DataExportSystemEntities();
Line 14: protected void Page_Load(object sender, EventArgs e)
Line 15: {
實體框架DLL是出現在bin文件夾中。
你如何引用EF?使用NuGet?你有沒有試過Fusion Logger? – abatishchev
'DataExportSystemEntities'看起來不像EF類。這是你自己的。不是嗎? – abatishchev
我不確定我是否創建了新模型,並在項目中添加了參考。 –