c# - "Namespace could not be found"带有 ASP 5 和本地项目引用

标签 c# asp.net asp.net-web-api asp.net-core

我有https://github.com/Mech0z/Foosball9000/tree/Auth我已经从我的启动项目 FoosballApi2 () 中引用了模型项目。

但是当我尝试构建时,我得到了

Severity Code Description Project File Line Error CS0246 The type or namespace name 'Models' could not be found (are you missing a using directive or an assembly reference?) FoosballApi2.DNX Core 5.0 C:\Git\Foosball9000\FoosballApi2\Controllers\LeaderboardController.cs

Severity Code Description Project File Line Error CS0246 The type or namespace name 'LeaderboardViewEntry' could not be found (are you missing a using directive or an assembly reference?) FoosballApi2.DNX Core 5.0 C:\Git\Foosball9000\FoosballApi2\Controllers\LeaderboardController.cs

在 VS 2015 中,我在构建之前完全没有错误,所以没有读取行或任何东西 enter image description here

最佳答案

我在尝试添加对类库项目的引用时看到了这个问题。将其添加为类库(包)项目。

关于c# - "Namespace could not be found"带有 ASP 5 和本地项目引用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33787042/

相关文章:

用于国际化的 C# 库?

c# - 如何在高级安装程序 (13.3) 自定义操作中加密连接字符串

c# - 单击 C# 中的按钮时变量会重新初始化

javascript - Angular post 和 web api C#

c# - 为什么我不能在 HTTP 响应 header 中设置 'Allow'?

C#:非标志枚举,有没有更简单的方法来检查枚举以匹配多个值之一?

c# - GTK C# 小部件更改颜色不起作用

c# - Azure Devops Visual Studio 测试任务无法发现具有 TestCaseSource 属性的 Nunit 测试

c# - 如何将参数传递给ajax调用

c# - ASP.NET Web API 不返回 XML