Click here to Skip to main content
15,885,757 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
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
(https://skydrive.live.com/redir?resid=D54B0993343A8868!133&authkey=!ACZ_YFWN08UQQlU[^])

VB
with regards ,
jophy
Posted
Updated 10-Jul-12 20:19pm
v2
Comments
[no name] 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.
--SA
Trak4Net 10-Jul-12 13:36pm    
Have a look at this...
http://msdn.microsoft.com/en-us/library/7d83bc18(v=vs.80).aspx

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
    myCompanyName
        myApplicationName         <-- your .EXE goes in here
            DLLs                  <-- your .DLLs go here
 
Share this answer
 
v2
Comments
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 (http://www.microsoft.com/en-us/download/details.aspx?id=17630) 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.
--SA
Dave Kreskowiak 11-Jul-12 19:24pm    
How about this.... TRY IT!
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,
—SA
 
Share this answer
 
v3
Comments
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...
--SA

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900