0

I have a solution with one application project(.exe) and one dll project(.dll).

I created dll by specifying the location in build event (..\out\debug\lib) and exe location (..\out\debug). Why again the dll is created in exe location? I need the exe to locate from (..\out\debug\lib) only. My another question is when I build in 'Release' mode, the exe wont work and shows the error "specified dll not found". Please help me on these. Thank you

Shivakumar
  • 15
  • 3
  • 1
    There isn't enough information for us to help out. Please show us the full paths you're using an the relatives ones you inserted into the build event, so we can try and see if one of the paths is wrong. – Yuval Itzchakov Sep 27 '15 at 06:44
  • possible duplicate of [C# - Set Custom Path to Referenced DLL's?](http://stackoverflow.com/questions/1892492/c-sharp-set-custom-path-to-referenced-dlls) – M.kazem Akhgary Sep 27 '15 at 06:48
  • Ok, in my solution, one application project I have a output path as (..\out\debug\) and dll project (say Testdll.csproj) I have given output as (..\out\debug\lib). Why the .exe is creating .dll in its location & refering it? – Shivakumar Sep 27 '15 at 06:52
  • You can only debug or run your solution when the CLR can find *all* of the class library assemblies that your EXE project uses. Which means that the DLLs need to be either in the GAC or in the same directory as the .exe. Never use the GAC on your dev machine. The build system is already very good at taking care of that, you do not have to help. With the inevitable failure mode that if you help too much then it can't get its job done properly. Tinkering with build events and changing the "Output path" setting is a good way to give it a headache. Stop helping. – Hans Passant Sep 27 '15 at 09:10

0 Answers0