繁体   English   中英

ASP.NET Web Api-控制器脚手架出错

[英]ASP.NET Web Api - Error while controller scaffolding

我正在尝试运行简单的ASP.NET Web API项目(.NET Framework 4.5.2)。 它使用存储在.dll文件中的类库。 在使用“带有动作的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是我想作为控制器的类。

这个问题有什么解决方案?

也许不是真的回答这个问题,但是我从将类库作为dll更改为包括整个类库项目,现在可以使用了。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM