Compilation Error: My (type/namespace/dll) can't be found?

On my local machine, I use and reference a .dll in my web application [ASP .NET 4.0, VS 2010 C#] and my application loads just fine. However when I load my application onto / into a shared folder on a server that I've been given access to, when I try to run the application, I get a compilation error telling me:

     "The type or namespace name 'IBM' could not be found (are you missing a using directive or an assembly reference?)"

What would be some possible causes of this that I can look into?
Michael SterlingWeb Applications DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Fernando SotoRetiredCommented:
It sounds like it can't find the dll IBM.dll, Is this dll located on the server you just loaded to? Most likely the cause of your issue.
Michael SterlingWeb Applications DeveloperAuthor Commented:
I think you're correct. This is the work around that we came up with. Please let me know if there's anything else I can try. I wound up having to use the CompilerOptions property of the <@ Page @> directive at the top of each of my .aspx pages. I had to set it to the path where the IBM dll lives on the server. I'm new to this project but was told that on each PC, and the web server(s), the dll file lives in the same place. I did find it on my machine but don't have access to the folder where it would live, on the web server.

To test out what would happen, we had our network person drop the IBM dll file into a folder named "bin" on the intranet web server. when he did, my web site worked but it broke every other web site on the web server returning a message that pretty much said, ~"the project was already referencing that dll assembly somewhere else." All the other web sites on that server have that CompilerOption property, with its value set to the path where the IBM dll lives, in the .aspx page. That bin folder was on the same level, in the file structure, as was/is all the other websites on that intranet server. Again, the IBM dll, on that server already lives in a directory that is the path we are having to "hard code" into a the CompilerOptions property of the <@ Page @> directive.

So what do you think we would need to do, to allow each application to use its own local copy of that IBM .dll file? Remove it from that other location, and place it in either that "bin" folder or remove it from that other location and only place it (locally) in each web site? Thoughts?
Fernando SotoRetiredCommented:
Hi mikesExpertExchange;

This is just my opinion but if you place the dll in the bin folder of the application you would probably run into less issues. If it's absolutely necessary for all the programs to access the same dll then the Global Assembly Cache, GAC, would most likely be a next location to use. Please read this article, "How to load an assembly at runtime that is located in a folder that is not the bin folder of the application."

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Michael SterlingWeb Applications DeveloperAuthor Commented:
Thank you.
Fernando SotoRetiredCommented:
Not a problem mikesExpertExchange, glad I was able to help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.