Build Output Path for Plugins

rbulph

Junior Contributor
Joined
Feb 17, 2003
Messages
397
Could someone please clarify to me how the build output paths in http://www.xtremedotnettalk.com/showthread.php?t=49597&highlight=build+output+path work? I would like to have the exe and dlls in the same folder on the user's computer, so how do I go about mirroring this as I develop the application and plug-ins? Do I need a folder especially for building both the host exe and plug-in dll? How does this tie in with the need to have both a debug and a release version of whatever I build?
 
Output path

In project properties, you can set the output path on the Build tab. This setting determines where the compiled assemblies (exe, dll, etc) are placed. If you use the same path for both the application project and the plugin project, then both compiled assemblies will be placed in the same folder. This can be any folder you choose. Note that Debug and Release builds have seperate properties so you can set them independently (eg myfolder\Debug\ and myfolder\Release\).

Good luck :cool:
 
I'm using Visual Basic in Visual Studio 2005. This has a Compile tab under the Project Properties with a "Build Output Path" entry. Sounds like this is the thing you're talking about. I have set this to be the same for both the exe and the dll, and it's completely ignored - nothing is created in the directory I specify and the projects just build to the bin directories in the same directory as they themselves are in, as before.

I don't see anywhere to set release and debug build output paths separately.
 
Under "My Project", open the compile tab. Select the type of build you want using the "Configuration" combobox at the top. Then, set the build output in the "Build Output Path" textbox.
 
I don't have a Configuration combobox (see attached screenshot). But anyway, when I set the build output path on the Compile tab it only sets the path for the release build, not the debug build. There's no comparable textbox on the Debug tab.

Also, as I mentioned, setting the path on the Compile tab sometimes works, and sometimes is completely ignored. I can't figure out why.
 

Attachments

Are you using the Express Edition? The ability to change debug/release is one of the things you sacrifice by using the express edition.

An alternative to setting the output path is to use a post build event to copy built files. Click on the "build events..." button to open the build events window. You can then reference batch files or other command line commands.

This utility a co-worker and I put together might also prove useful both with build events and on it's own.
 
No, using the Professional Edition.

Thanks for the suggestions re Build Events. I'll look into this if I have time, but I can't help thinking it would be easier for me just to copy the dll over manually each time I change it...
 
Are you using the Express Edition? The ability to change debug/release is one of the things you sacrifice by using the express edition.
This is a common misconception with the Express editions of VS. There is an option to enable the familiar Debug/Release configurations. It is simply disabled by default. Either way, the Build Events should be sufficient. A very handy and easy way to post-process your compiled app. All you have to do is write a very simple batch file that will copy your files. I can't imaging that this would be harder than manually copying the files each time. It is one line of code and in the end you will certainly save time.
 
This is a common misconception with the Express editions of VS. There is an option to enable the familiar Debug/Release configurations. It is simply disabled by default. Either way, the Build Events should be sufficient. A very handy and easy way to post-process your compiled app. All you have to do is write a very simple batch file that will copy your files. I can't imaging that this would be harder than manually copying the files each time. It is one line of code and in the end you will certainly save time.

It is harder if you don't even know what a batch file is! Would you be really kind and give me an example of the sort of code I should be putting in the post build event command line?
 
A quick google search turned up a few tutorials and help with batch files. That should put you in the right direction.

I think the code in the batch file would look something like...
Code:
copy sourceFile destination
 
Thanks, yes, that does it. The bin folder for the dll does not contain debug and release folders - the dll is directly within the bin folder. So I must need that dll for both debugging and the release.
 
Back
Top