Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C# WPF VS2010 setup
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 7:24am
Edited 10-Jul-12 21:19pm
Wes Aday at 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 at 10-Jul-12 13:23pm
Not enough information.
Trak4Net at 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 at 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 at 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 at 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 at 11-Jul-12 14:42pm
WPF should not make any difference.
Dave Kreskowiak at 11-Jul-12 19:24pm
How about this.... TRY IT!
Sergey Alexandrovich Kryukov at 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 at 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 at 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
0 OriginalGriff 300
1 Peter Leow 180
2 ProgramFOX 145
3 DamithSL 140
4 Zoltán Zörgő 130
0 OriginalGriff 160
1 ProgramFOX 105
2 Sergey Alexandrovich Kryukov 60
3 Mehdi Gholam 50
4 DamithSL 50

Advertise | Privacy | Mobile
Web03 | 2.8.150224.1 | Last Updated 11 Jul 2012
Copyright © CodeProject, 1999-2015
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