Click here to Skip to main content
13,097,926 members (57,608 online)
Rate this:
Please Sign up or sign in to vote.
Hello all,
I have a project that have two projects One control library and main project . It is working in Vs but after installing it not working..

I place the All .dll in one folder and Exe in other folder ,
like :

Program Files\MyApp\dll\

Program Files\MyApp\exe\

now it not working Why ???????
any problem in this stretcher of Setup project ..
attaching a link to sample project link : Sample project

with regards ,
Posted 10-Jul-12 6:24am
Updated 10-Jul-12 20:19pm
Wes Aday 10-Jul-12 12:39pm
"any problem in this stretcher".. not sure at all what that is supposed to mean. Is Program Files\MyApp\dll in the system path? Are you getting an error when you run your project? Does the process show up in task manager? Is your exe and dll supposed to be seperated into different folders?
Sergey Alexandrovich Kryukov 10-Jul-12 13:23pm
Not enough information.
Trak4Net 10-Jul-12 13:36pm
Have a look at this...
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

The quick solution is to NOT seperate your .DLL files from the .EXE. Put them all in the same folder.

When a .DLL is needed the assembly resolver will look in the same folder as the .EXE calling for it (by default, it will NOT look in subfolders!) If it is not there, it'll start walking the PATH environment variable looking for it.

The long answer is to tell the assembly resolver where to probe for .DLLs (assemblies). You put this in your applications initialization code:
AppDomain.CurrentDomain.SetupInformation.PrivateBinPath = "mySubFolderName";

The specified sub folder MUST be a subfolder under the .EXE launch folder for this to work:
C:\Program Files
        myApplicationName         <-- your .EXE goes in here
            DLLs                  <-- your .DLLs go here
jophyjob 11-Jul-12 0:07am
It not working ... i getting error dll not found , my need is that make exe without dlls( embedded dll in side exe) i added a link to sample project see link
Dave Kreskowiak 11-Jul-12 8:18am
Well, THAT completely changes the question.

So long as all the .DLL's are .NET .DLL's you can use ILMERGE ( to combine the assemblies into one.
jophyjob 11-Jul-12 9:40am
I am using Wpf application is it possible o use ILMERGE. I also using DevExpress dlls any problem
Sergey Alexandrovich Kryukov 11-Jul-12 14:42pm
WPF should not make any difference.
Dave Kreskowiak 11-Jul-12 19:24pm
How about this.... TRY IT!
Sergey Alexandrovich Kryukov 11-Jul-12 14:41pm
Well, this is a right idea, my 5.
I should only add that using the depending .NET assemblies in different directories is quite possible and practical if one shared some assemblies in several applications. In this case, the developer should take care about the assembly location resolution. It can be done with *.exe.config files...
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

In the description of this issue, there is no information we could use to help you. You can make some of the following steps:

Good luck,
Dave Kreskowiak 10-Jul-12 14:14pm
WT.?? That's a LOT of info and it doesn't have to do with the OP's problem. There IS enough information there to figure out what he's talking about.

For once, see MY answer! ;)
Sergey Alexandrovich Kryukov 11-Jul-12 14:41pm
I probably answered before v.2 of the question, that's it...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.170813.1 | Last Updated 11 Jul 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100