类型或命名空间错误 [英] Type or Namespace Error

查看:176
本文介绍了类型或命名空间错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序中有两个引用。在BAL代码中,我可以使用 using TestDAL;命名空间。

I have two references in my application. In the BAL code i am able to use the namespace "using TestDAL;"

但是我无法在.cs页面中使用BAL命名空间。这是我得到的错误,

But I am not being able to use the namespace of BAL in my .cs page. This is the error i get,


CS0246:找不到类型或名称空间名称 TestBAL(
您是缺少using指令或程序集引用吗?)

CS0246: The type or namespace name 'TestBAL' could not be found (are you missing a using directive or an assembly reference?)

在bin文件夹中还有一件事我只有TestDAL.dll文件。如何插入TestBAL.dll文件?

And one thing in my bin folder too I only have the TestDAL.dll file. How do I insert TestBAL.dll file?

有人可以帮助我吗?

预先感谢,

推荐答案

尝试一下:

然后,单击浏览并添加.dll文件:

Then, click browse and add your .dll file:

这应该会对您有所帮助,如果没有请留下一些反馈。

That should help you, if not please leave some feedback.

您还可以尝试使用别名来命名空间,如下所示:

You could also try using alias for your namespace like this:

using namespaceAlias = TestBAL;

这篇关于类型或命名空间错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆