Search code examples
c#visual-studio-2010wixpost-build-eventbuild-events

Copying application files with visual studio for debugging


I am using VS2010 and created a program using C#.

I got a WIX installer which is creating sub folders in the application's main folder and is copying files to these folders.

The problem is that when I want to just run the application from VS and debug it, the directories are not created as in my WIX file, but in my code I count on these directories to appear and to access the files there.

How can I make visual studio create the same directory tree of the application when compiling it, like the one created in the installation itself so I can run it and debug it with everything in place?


Solution

  • The way I solved it (and if you got a better solution I'll be happy to share it) was going to the main project's properties and add some post build events which copied the files the way they should. That way I can debug without the need of using the Debugger.Launch(); line