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的,这是脚手架工具的错误。

相关问题