HELJ Posted May 29, 2003 Posted May 29, 2003 Hello, Im normally an ASP.NET person but had to create an EXE in VB.net for a particular task. This EXE references a DLL that is located at C:\Components\. I've added the Imports line to my Module as well. When I compile it and run the EXE from the project bin folder, it works fine. When I try to move the EXE to some other location on my machine (like C:\EXAMPLE\MyEXE.exe) it crashes and fails saying that it cant find the referenced DLL. Since I am defining the absolute path to the DLL, why would it work in one location, and not on another (on the same machine)? Thanks very much, Helj Quote
*Gurus* divil Posted May 30, 2003 *Gurus* Posted May 30, 2003 You're not defining an absolute path. When VS builds your project, it is copying the DLL to reside in the same folder as the EXE file. .NET executables look for assemblies in the same directory as themselves, then any configured subdirectories, then in the GAC (global assembly cache). Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.