DLL Outputg path problem

Y

Yoavo

Hi,
I have an application which contains an .exe and a .dll.
I want that the DLL will be built in a different location than the .exe.
I set its output path in the "Build" property tab to a different folder.
I build the solusion and everything seems to be as I wanted.
When I added a dependency between the .exe to the .dll, the .dll was build
twice:
once in the location I wanted, and the other in the location of the .exe.

What can I do in order to build it only in the location I want ?

Yoav.
 
I

Ignacio Machin ( .NET/ C# MVP )

Hi,
I have an application which contains an .exe and a .dll.
I want that the DLL will be built in a different location than the .exe.
I set its output path in the "Build" property tab to a different folder.
I build the solusion and everything seems to be as I wanted.
When I added a dependency between the .exe to the .dll, the .dll was build
twice:
once in the location I wanted, and the other in the location of the .exe.

What can I do in order to build it only in the location I want ?

Yoav.

You cannot do that I fear.

You would have to do it manually, compile your dll and copy it in the
target folder, then add the reference in the .EXE proejct and uncheck
the copy locally.

Why y ou want to do this anyway?

Tip:
you have to be careful when yuo deploy this system, if the other
folder is not searched by default by the framework it will not find
the dll
 
Y

Yoavo

The reason I want to do it is that my application have many files, and we
want to insert some hirarchy in the application files structure.
For example to insert all the resources DLL's under the same folder.

message
Hi,
I have an application which contains an .exe and a .dll.
I want that the DLL will be built in a different location than the .exe.
I set its output path in the "Build" property tab to a different folder.
I build the solusion and everything seems to be as I wanted.
When I added a dependency between the .exe to the .dll, the .dll was build
twice:
once in the location I wanted, and the other in the location of the .exe.

What can I do in order to build it only in the location I want ?

Yoav.

You cannot do that I fear.

You would have to do it manually, compile your dll and copy it in the
target folder, then add the reference in the .EXE proejct and uncheck
the copy locally.

Why y ou want to do this anyway?

Tip:
you have to be careful when yuo deploy this system, if the other
folder is not searched by default by the framework it will not find
the dll
 
I

Ignacio Machin ( .NET/ C# MVP )

The reason I want to do it is that my application have many files, and we
want to insert some hirarchy in the application files structure.
For example to insert all the resources DLL's under the same folder.

you will have to make that folder searchable by the framework loaded.
Otherwise your program will not start.
You will also needs to prepare accordingly the setup project.
IIRC you can control everything in the setup project, when adding an
output of a project you will see the dependencies being added, you can
remove one. This will be the dll that is shared among the coponents.
This dll will be placed in your common folder.

And again, remember that you might have to change the loading path for
the framework
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top