Help with filenotfound error

techmanbd

Junior Contributor
Joined
Sep 10, 2003
Messages
397
Location
Burbank, CA
Hello all.

Here is what I have done. I created a DLL of constants for test equipment I use, and have a few different programs that use this dll. So for the first few programs the dll was getting installed in the application file. Well since I don't want multiples of the same dll, I put it in the system32 folder. In my Setup I have it go to the system32 folder and it worked fine for that. But when I start the application I just finished I get this error

An unhandled exception of type 'System.IO.FileNotFoundException' occurred in Haft_4000 Load Box Interface.exe

Additional information: File or assembly name HB_Haft4000_Constants, or one of its dependencies, was not found.

When I reference the dll in the project, I reference it from system32 file. Any Ideas that I am not seeing? Thanks.
 
Ok, I got it working. Here is what I did. I deleted DLL reference, then re-referenced it, and it works now. I don't really understand what happened, but that fixed the problem. Can anyone enlighten me on why this may have happened so I can learn something new?
 
.Net has it's own methods of handling shared files and system32 isn't it. Either continue to have a separate copy in each applications directory, or if it is a shared file then give it a strong name and install it into the GAC (Global Assembly Cache).
 
Back
Top