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
That may be it's in a different project in the current solution, in a external DLL, or just in a different namespace in another file in the current project. Start by hovering the mouse over the error, and open the drop down that appears. If it has an "include" option, click that, and it should fix it.
error CS0246: The type or namespace name `________' Could not be found. Are you missing a using directive of assembly reference? This error is caused when the namespace that you are trying to use does not exist.
To fix this error, simply update the example . csproj file to use a previous System. CommandLine version. Note that this package is only used to parse the options for the example.
Namespaces are used in C# to organize and provide a level of separation of codes. They can be considered as a container which consists of other namespaces, classes, etc. A namespace can have following types as its members: Namespaces (Nested Namespace)
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.
A spurious “The type or namespace name could not be found” build error can result if you have other build warnings.
I'd partially coded an asynch HTTP method, which was generating warnings about missing awaits. I planned to get the rest of the system building, then fix that.
But I started getting the above hard error. I've spent the last three hours trying to isolate its cause. I tried all the suggested fixes, quadruple checked names, etc., and even deleted and recreated the project that was generating the complaints. No change. It seemed strange to me that when I clicked Go To Definition on the offending type reference, VS 2012 could find it with no problem. WTF*
As a last resort, I commented out the code that was producing the warnings. This fixed the spurious error messages and the build succeeded.
So, if you've ruled out the other causes and you have other build warnings, try fixing those.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With