工具”菜單下的“Library Package Manager”子功能表下的“Package Manager Console”菜單選項,
如果 Package Manager Console提示錯誤
請下載安裝
http://www.microsoft.com/downloads/zh-cn/details.aspx?FamilyID=863E7D01-FB1B-4D3E-B07D-766A0A2DEF0B
因為我的系統是2008 你根據你的系統下載對應更新檔案
安裝完成提示重啟
在Package Manager Console中輸入以下命令安裝EFCodeFirst
PM> install-package efcodefirst
PM> install-package efcodefirst
未安裝“EntityFramework (≥ 4.1.10331.0)”。正在嘗試從源檢索依賴項...
完成
You are downloading EntityFramework from Microsoft, the license agreement to which is available at http://go.microsoft.com/fwlink/?LinkID=211010. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
已成功安裝“EntityFramework 4.1.10331.0”
已成功安裝“EFCodeFirst 1.1”
已成功將“EntityFramework 4.1.10331.0”添加到 MvcTest
已成功將“EFCodeFirst 1.1”添加到 MvcTest
PM>
以下網上說過到的步驟 最後我還是沒有安裝成功
工具”菜單下的“Library Package Manager”子功能表下的“Add Library Package Reference”菜單選項,
點擊左邊面板中的“online”
在右上方的搜尋輸入框中輸入“EFCode”。在檢索結果中,選擇EFCodeFirst包,並且點擊Install按鈕安裝包
如果安裝時提示(
This package (or one of its dependencies) contains PowerShell scripts and needs to be installed from the Package Manger Console
)
請下載安裝
http://www.microsoft.com/downloads/zh-cn/details.aspx?FamilyID=863E7D01-FB1B-4D3E-B07D-766A0A2DEF0B
因為我的系統是2008 你根據你的系統下載對應更新檔案
下載安裝更新 還是提示以上錯誤資訊
不知道是什麼原因
請高手指教