Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. The type or namespace Couldn't be Loded

The type or namespace Couldn't be Loded

Scheduled Pinned Locked Moved ASP.NET
questioncsharpasp-nethelp
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dibya_2003
    wrote on last edited by
    #1

    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

    S 1 Reply Last reply
    0
    • D dibya_2003

      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

      S Offline
      S Offline
      StianSandberg
      wrote on last edited by
      #2

      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

      C 1 Reply Last reply
      0
      • S StianSandberg

        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

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #3

        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.

        D 1 Reply Last reply
        0
        • C Christian Graus

          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.

          D Offline
          D Offline
          dibya_2003
          wrote on last edited by
          #4

          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

          C 1 Reply Last reply
          0
          • D dibya_2003

            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

            C Offline
            C Offline
            Christian Graus
            wrote on last edited by
            #5

            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.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups