   [web] ASP.net + missing  an assembly reference
  Hello, I wanted to make a library for my asp.net pages, so I created a Klib.dllOn my local machine I simply used VS.net and clicked on Add Reference and everything worked fine.  The problem is when I uploaded it to my web server...it gives me the common error message CS0246: The type or namespace name 'KLib' could not be found (are you missing a using directive or an assembly reference?)So my question is, how do add an Reference on my web server ( a machine i'm not actually sitting on )Thanks   
  Your build process is wrong then.Normally you'd find that the build process copies all the referenced assemblies not in the GAC (as well as ones it's built) into a directory /bin under the context root.Then your deployment process can copy the entire web application up into your production server (of course remembering not to accidentally copy web.config from dev to production - that would be severely bad!).There are a few other things which must be excluded - for example the aspnet_client files differ between different versions of .NET and/or Windows and should never be copied from one box to another- the result is silent failure of some web controls in MSIE.NB: The above applies to ASPNET 1.0 and 1.1 only, ignore all the above for ASPNET2, I've no idea what happens there.PS: Do not add your assemblies to the GAC.Mark   ;  Thanks alot for your reply Mark,(I am using ASP.net 2)I just tried it again, created a new simple project from scratch using Visual Web Developer Express 2k5, added my Reference (KLib.dll) then added the using directive (using KLib;), and bingo, works great on my local machine using the VWD test server.Then, I copy the whole directory (Including the Bin Folder that was created with KLib.dll inside it) to 2 different web servers supporting asp.net 2.0 and they both fail with the same error message as before.The Contents of the Application (or, what was in the directory I uploaded is )FOLDER App_DataFOLDER Bin    FILE KLib.dll    FILE KLib.dll.refreshFILE Default.aspxFILE Default.aspx.csFILE default.css Am I building it wrong? Are those the files that are suppose to be uploaded? Am i missing something?   ;  I'm not sure what Visual Web Developer express is, but have you tried on a normal IIS box to test it? I assume you have one knocking around on your LAN to try it out.In ASPNET1, normally you will compile your project's codebehind files (+ any other classes) into one assembly, and have that in the "Bin" directory. However, I believe ASPNET2 does not work quite the same.Adding the reference only actually tells the build to copy the assembly and refer to it when compiling.You don't need to do "Add reference" at runtime because the assembly will already contain a reference to the other one.I could be completely wrong. I've only used ASPNET1.Mark   ;  Thanks again for your reply Mark.It turns out, that I needed an IIS Application Directory (or a Virtual Directory)...Which VS.net creates automatically, but which you cannot create via FTP..So what I'm guessing happend, is that the app would look in the GAC and then look for the root Bin folder? (Or some other place where the files were not)..I'm suprised more people havn't had this problem?  I would think it would be very common for ASP.net developers who are using Shared Hosting (like me)If anyone knows a good work around for this problem, that would be awesome.Thanks again mark,ArchG   ;  Right, so you need to get IIS to mark the directory as a "Context root", otherwise it'll ignore the "bin"Again, don't *ever* put stuff in the GAC. It's the Wrong thing to do.Mark   