c# - 构建过程中出现错误 "The type or namespace name could not be found"

标签 c# winforms 3-tier

我在 C# Windows 应用程序中使用,我已经在使用

TempProWin --> 适用于 Windows 应用程序项目
TempProApp --> 用于数据库和功能,例如使用 CSLA 方法的类文件。

在 TempProWin.frmLogin.cs 中:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using  TempProApp;

private void frmLogin_Load(object sender, EventArgs e)
{
 UserLoginList oUserLoginList = UserLoginList.GetUserLoginList();
 cmbUserName.DataSource = oUserLoginList;
 cmbUserName.DisplayMember = "Select User";
}

但是当我构建这个应用程序时,出现了以下错误:

Error 5 The type or namespace name 'TempProApp' could not be found (are you missing a using directive or an assembly reference?)

我已经从 D:\TempPro\TempProApp\bin\Debug 路径中​​包含了对 TempProApp.dll 的引用

最佳答案

右键单击 TempOrAl 并转到定义。

在最上面,您将看到 dll 名称及其版本。您可以验证是否使用相同的 dll 版本。

关于c# - 构建过程中出现错误 "The type or namespace name could not be found",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21626826/

相关文章:

c# - 使用 BouncyCaSTLe 生成的证书验证为服务器时出现 "The credentials supplied to the package were not recognized"错误

c# - 如何从 C# 使用 CHKDSK 工具并在 CMD 窗口中显示文本?

c# - 当验证需要数据库时,BL 与 DAL

.NET:Graphics.DrawImageUnscaled 有什么作用?

java - apache服务器在java swing应用程序(3层)中的作用是什么?

c# - 在三层项目中放置 DTO/POCO

c# - 为什么 HashSet<T> 归因于 MayLeakOnAbort,但 Dictionary<K,V> 没有?

c# - Windows 窗体 ComboBox 下拉位置

使用 .net 3.5 进行不带参数的 C# 调用

c# - "The process cannot access the file because it is being used by another process "