The type or namespace Couldn't be Loded
-
Hi guys, I have develoved a dll file for asp.net with "BusJWLRY" namespace and placed under "Bin" folder. It works fine in local computer but its throws exception as "Compiler Error Message: CS0246: The type or namespace name 'BusJWLRY' could not be found (are you missing a using directive or an assembly reference?)" while running from www. What is the main reason? plz. Thanks, Dibya Mani Suvedi
-
Hi guys, I have develoved a dll file for asp.net with "BusJWLRY" namespace and placed under "Bin" folder. It works fine in local computer but its throws exception as "Compiler Error Message: CS0246: The type or namespace name 'BusJWLRY' could not be found (are you missing a using directive or an assembly reference?)" while running from www. What is the main reason? plz. Thanks, Dibya Mani Suvedi
There are several reasons for this error: The name of the type or namespace you are trying to use may be misspelled (including the correct case). Without the correct name the compiler is unable to find the definition for the type or namespace you have referred to in your code. This occurs most often because C# is case-sensitive and the correct casing has not been used when referring to the type. For example, Dataset ds; will generate CS0246; notice the s in Dataset is not capitalized. If the error is for a namespace name, you may not have referenced (/reference) the assembly containing the namespace. For example, your code might contain using Accessibility;. However, if your project doesn't reference the assembly Accessibility.dll then you will get CS0246. See Add Reference Dialog Box for information on how to add a reference in the development environment. If the error is for a type name, you may not have the proper using directive, or you have not fully qualified the name of the type. Consider the following line of code: DataSet ds;. To be able to use the DataSet type you would need to do two things. First, you need a reference to the assembly that contains the definition for the DataSet type. Second, you need a using directive for the namespace where DataSet is located. For example, because DataSet is located in the System.Data namespace, you would need the following statement at the beginning of your code: using System.Data;. The second step is not required. However, if you omitted this step then it would require that you fully qualify the DataSet type when referring to it. Fully qualifying it means that you use the namespace and type each time you refer to it in your code. So, if you decided to skip the second step you would need to change your declaration code above to: System.Data.DataSet ds;. If the error is for a non-type, you may have used a variable or something else when a type was expected. For example, in the is statement, if you use a Type object rather than an actual type, you will get this error. http://msdn.microsoft.com/en-us/library/w7xf6dxs(VS.80).aspx[^]
--------------- www.serverside.no
-
There are several reasons for this error: The name of the type or namespace you are trying to use may be misspelled (including the correct case). Without the correct name the compiler is unable to find the definition for the type or namespace you have referred to in your code. This occurs most often because C# is case-sensitive and the correct casing has not been used when referring to the type. For example, Dataset ds; will generate CS0246; notice the s in Dataset is not capitalized. If the error is for a namespace name, you may not have referenced (/reference) the assembly containing the namespace. For example, your code might contain using Accessibility;. However, if your project doesn't reference the assembly Accessibility.dll then you will get CS0246. See Add Reference Dialog Box for information on how to add a reference in the development environment. If the error is for a type name, you may not have the proper using directive, or you have not fully qualified the name of the type. Consider the following line of code: DataSet ds;. To be able to use the DataSet type you would need to do two things. First, you need a reference to the assembly that contains the definition for the DataSet type. Second, you need a using directive for the namespace where DataSet is located. For example, because DataSet is located in the System.Data namespace, you would need the following statement at the beginning of your code: using System.Data;. The second step is not required. However, if you omitted this step then it would require that you fully qualify the DataSet type when referring to it. Fully qualifying it means that you use the namespace and type each time you refer to it in your code. So, if you decided to skip the second step you would need to change your declaration code above to: System.Data.DataSet ds;. If the error is for a non-type, you may have used a variable or something else when a type was expected. For example, in the is statement, if you use a Type object rather than an actual type, you will get this error. http://msdn.microsoft.com/en-us/library/w7xf6dxs(VS.80).aspx[^]
--------------- www.serverside.no
I doubt it's any of these things, it's a deployment issue, he says it works fine for him locally.
Christian Graus Driven to the arms of OSX by Vista.
-
I doubt it's any of these things, it's a deployment issue, he says it works fine for him locally.
Christian Graus Driven to the arms of OSX by Vista.
You are right "Christian". I have just uploaded all files into server through FTP. Do you have any more idea about this issue? How can I get rid of this problem? Thanks, Dibya
-
You are right "Christian". I have just uploaded all files into server through FTP. Do you have any more idea about this issue? How can I get rid of this problem? Thanks, Dibya
The dll is plainly not in the right place on the server, or it uses a version of .NET that's not present, or some other deployment specific issue.
Christian Graus Driven to the arms of OSX by Vista.