1

I have a asp.net website i made a database service library made a dll file for that and imported that in website.it works fine in local but when i uploaded it on host i met an error could not fine assembly even though file is in bin folder.

Line 5:  using System.Web.UI;
Line 6:  using System.Web.UI.WebControls;
Line 7:  using my.LinqClasses;
Line 8:  
Line 9:  public partial class Webcontrols_Sidemenu : System.Web.UI.UserControl

my.LinqClasses is showing error CS0246: The type or namespace name 'my' could not be found (are you missing a using directive or an assembly reference?)

Rajeev
  • 59
  • 1
  • 1
  • 8
  • What type are you getting this error for? It won't be possible to answer this without at least knowing what namespace / type isn't available – JaredPar Aug 25 '13 at 18:29
  • how you uploaded the file? there may be permission problems... – Antonio Pelleriti Aug 25 '13 at 18:33
  • What is the exact error message: Unable to find .... .dll? Please fill the blanks – Steve Aug 25 '13 at 18:58
  • CS0246: The type or namespace name 'my' could not be found (are you missing a using directive or an assembly reference?) – Rajeev Aug 25 '13 at 19:03
  • 1
    Does `my.LinqClasses` actually exists? If it does, is it declared in the same assembly? If it is not, is there a reference to the assembly it is declared in? – Nikola Dimitroff Aug 25 '13 at 19:41
  • With some third-party items used locally, I've had to grant read/execute permissions on the DLLs used to the app pool's service account for the web site, but those were typically unmanaged DLLs. Still, it's something to try. – ps2goat Aug 26 '13 at 01:47
  • Check http://stackoverflow.com/questions/3304741/vs2010-getting-type-or-namespace-name-could-not-be-found-but-everything-seem – Brij Feb 20 '14 at 12:21
  • if that doesn't solve it, check http://stackoverflow.com/questions/4764978/the-type-or-namespace-name-could-not-be-found. it worked for me – Ricardo Appleton Mar 24 '14 at 10:55

1 Answers1

2

Just right click on the error and select the "resolve using" (if present). This will add the missing assembly directive in your webform. If the option is not available the attach the correct assembly manually. Hope this help.

Bhupendra Shukla
  • 3,814
  • 6
  • 39
  • 62