我想运行简单的ASP.NET Web API项目(.NET Framework 4.5.2)。它使用存储在.dll文件中的类库。在使用“用行动API控制器,使用实体框架”,并称控制器我得到这个错误:ASP.NET Web Api - 控制器脚手架出错
A type with the name [A].[B] does not exist
in Microsoft.VisualStudio.Web.CodeGeneration.ActionInvoker.<BuildCommandLine>b__6_0() in Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args) in Microsoft.VisualStudio.Web.CodeGeneration.ActionInvoker.Execute(String[] args) in Microsoft.VisualStudio.Web.CodeGeneration.CodeGenCommand.Execute(String[] args)
哪里A
是我的CL的主命名空间和B
是一流的,我想让控制器从。
这个问题的解决方案是什么?
在您尝试搭脚手架之前,您是否构建了解决方案?你是否也添加了一个对你的Web项目中有类的类库的引用? –