3

我正在開發一個Asp.Net核心RC2根據N層架構的Web應用程序。錯誤:多個類型匹配的名稱,而腳手架ASP.NET核心MVC RC2

enter image description here

當我嘗試使用腳手架來生成CRUD控制器和視圖,我收到以下錯誤。

enter image description here

我已經分別分開我的模型/的ViewModels和上下文/存儲庫類到業務邏輯層和數據訪問層。我在OpenBiz項目中將這兩個圖層作爲nuget包引用。但不能像上面看到的那樣執行腳手架。我的架構存在問題還是我在這裏丟失了什麼?從Github

+0

任何幫助?還問過這個關於Github腳手架回購的問題。 – ar27111994

+0

我甚至重新創建了這個項目,但都是徒勞的。 – ar27111994

回答

4

響應:

currently there is an issue with scaffolding, that it doesn't support model classes outside of the current project properly.

As a workaround, you can add the model temporarily to your web project and then move it to the BLL/ DAL projects after scaffolding.

另外,他們還開this issue as a bug,報價:

Scaffolding fails if model class is in a dependency (project/ library) of the project on which scaffolding is being run. #251

Project A has a dependeny on Project B. Project B has model class If you try to run scaffolding on Project A by using model class from Project B, it fails with the below error: No model type returned for type:

因此,如RC2的,這是腳手架工具的錯誤。

相關問題