Click here to Skip to main content
Rate this: bad
good
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
(https://skydrive.live.com/redir?resid=D54B0993343A8868!133&authkey=!ACZ_YFWN08UQQlU[^])
 
with regards ,
jophy
Posted 10-Jul-12 7:24am
Edited 10-Jul-12 21:19pm
v2
Comments
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.
--SA
Trak4Net at 10-Jul-12 13:36pm
   
Have a look at this...
http://msdn.microsoft.com/en-us/library/7d83bc18(v=vs.80).aspx
Rate this: bad
good
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
        myCompanyName
            myApplicationName         <-- your .EXE goes in here
                DLLs                  <-- your .DLLs go here
  Permalink  
v2
Comments
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 (http://www.microsoft.com/en-us/download/details.aspx?id=17630) 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.
--SA
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...
--SA
Rate this: bad
good
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,
—SA
  Permalink  
v3
Comments
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...
--SA

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

  Print Answers RSS
0 OriginalGriff 520
1 Maciej Los 290
2 Richard MacCutchan 265
3 BillWoodruff 265
4 Suraj Sahoo | Coding Passion 155
0 OriginalGriff 8,764
1 Sergey Alexandrovich Kryukov 7,437
2 DamithSL 5,639
3 Maciej Los 5,279
4 Manas Bhardwaj 4,986


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