Error "The type or namespace name could not be found" during a build process

user1941948 picture user1941948 · Feb 7, 2014 · Viewed 52.8k times · Source

I'm using in C# Windows Application, I have using

TempProWin --> For Windows Application Projects
TempProApp --> For Database and functionality like Class File using CSLA Method.

In 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";
}

But When I build this application, I got the following error:

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

I already include reference of TempProApp.dll from the path of D:\TempPro\TempProApp\bin\Debug

Answer

M.S. picture M.S. · Feb 7, 2014

RightClick on TempProApp and Go to definition.

On the top most, you will see the dll name and its version. You can verify that whether you are using the same dll version or not.