gpt4 book ai didi

c# - VS2013 Express 错误 : namespace is not recognized

转载 作者:行者123 更新时间:2023-12-04 17:02:53 24 4
gpt4 key购买 nike

我有三个项目:BLL、DAL 和 mycv。在 BLL 中引用 DAL,在 mycv 中引用 BLL 之后,我尝试调用安装在 BLL 中的现有函数。

我正在使用 Visual Studio 2013 Express、MVC5、AngularJS(我添加为 nuget)和 JQuery 库(我添加为 nuget)。

我将目标框架安装为 4.0 版本。

当我使用 using BLL 时,无法识别命名空间。

我给你我的解决方案的结构,你会看到所有的引用:

enter image description here

DAL 代码是:

public class DatosPersonales
{
public Entities.DatosPersonales getDatosPersonales_DAL()
{
return new Entities.DatosPersonales();
}
}

BLL代码是:
public class DatosPersonales
{
public Entities.DatosPersonales getDatosPersonales()
{
return DAL.DatosPersonales();
}
}

最后,在 mycv 项目中,我调用 DatosPersonales 的 BLL 类:
public ActionResult Index()
{
var clase = new DatosPersonales();
return View();
}

由于该错误,我无法成功编译。

如果您需要添加更多内容,请告诉我,我会为您提供更多信息。

怎么了?

最佳答案

您是否检查过您的 DAL 层是否已成功构建。尝试清理图层并一层一层地构建它们。首先是 DAL,然后是 BLL,最后是主层。

有时,如果您的最内层(或您的案例中的 DAL)未成功编译,它也会影响其他层。

关于c# - VS2013 Express 错误 : namespace is not recognized,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31635939/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com