简体   繁体   English

VS2013 Express错误:无法识别名称空间

[英]VS2013 Express Error: namespace is not recognized

I have three projects: BLL, DAL and mycv. 我有三个项目:BLL,DAL和mycv。 after to reference DAL inside BLL, BLL inside mycv, I tried to call a funcion installed inside BLL which is existing. 在引用BLL内的DAL,mycv内的BLL之后,我尝试调用已安装在BLL内的funcion。

I am using Visual Studio 2013 Express, MVC5, AngularJS (I added as nuget) and JQuery libraries (I added as nuget). 我正在使用Visual Studio 2013 Express,MVC5,AngularJS(我作为nuget添加)和JQuery库(我作为nuget添加)。

I installed Target Framework as 4.0 version. 我将目标框架安装为4.0版本。

When I use using BLL, the namespace is not recognized. 使用BLL时,无法识别名称空间。

I give you the structure of my solution and you'll see all the references: 我给您解决方案的结构,您将看到所有参考:

在此处输入图片说明

DAL code is: DAL代码是:

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

BLL code is: BLL代码为:

public class DatosPersonales
{
    public Entities.DatosPersonales getDatosPersonales()
    {
        return DAL.DatosPersonales();
    }
}

Finally, in mycv project I call BLL class of DatosPersonales: 最后,在mycv项目中,我将DatosPersonales的BLL类称为:

public ActionResult Index()
{
    var clase = new DatosPersonales();                
    return View();
}

With that error I can not compile succesfully. 由于该错误,我无法成功编译。

If you need something more to add let me know and I will give you more information. 如果您需要添加更多信息,请告诉我,我会给您更多信息。

What is wrong? 怎么了?

Have you checked that your DAL layer i building successfully. 您是否检查过我的DAL层是否已成功构建。 Try cleaning the layers and build them one by one. 尝试清洁这些层,然后一层一层地构建它们。 First DAL, then BLL and finally the main layer. 首先是DAL,然后是BLL,最后是主层。

Sometimes if your most inner layer (or DAL in your case) doesn't compiles successfully, it affects the other layers as well. 有时,如果最内层(在您的情况下为DAL)无法成功编译,那么也会影响其他层。

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

相关问题 VS2013导入命名空间“语法错误” - VS2013 Import Namespace “syntax error” VS2013 Express单元测试FileNotFoundException - VS2013 Express Unit Testing FileNotFoundException 错误“在VS2013中无法找到类型或命名空间名称'DotNetOpenAuth',但不是VS2012 - Error “The type or namespace name 'DotNetOpenAuth' could not be found” in VS2013 but not VS2012 VS2013:查找资源字典时发生错误/类型不是名称空间的一部分 - VS2013: An error occurred while finding the resource dictionary / Type is not part of namespace 如何修复VS2013:错误:找不到类型或名称空间“ Windows”? - How to fix VS2013: Error: type or namespace 'Windows' could not be found? VS2013 Pro中的BadImageFormatException-VS2013 Web Express中没有问题 - BadImageFormatException in VS2013 Pro - no problems in VS2013 Web Express VS2013 Elmah 404错误 - VS2013 elmah 404 error VS2013 Express-可移植类库(C#)的模板 - VS2013 Express - Template for Portable Class Library (C#) 将MS VS2013升级到MS VS2015错误CS0234类型或名称空间名称'Reporting'在名称空间'Microsoft'中不存在 - Upgrade MS VS2013 to MS VS2015 Error CS0234 The type or namespace name 'Reporting' does not exist in the namespace 'Microsoft' 为什么VS2013中的#warning会产生错误? - Why does #warning in VS2013 is producing an error?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM