1

I'm using Visual Studio 2008 and the imported GeckoFX-Framework in one of my projects. Since the Geckofx-13.0.dll uses the XUL-Runner itself, it's mandatory to have those files also in the build-directories of the project. Up to now I used to copy them manually into the two directories (Debug & Release).

I'm asking myself if I could tell VS to copy them automatically into those directories.

If those files are missing, the execution of the build fails.

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
Markus G.
  • 331
  • 1
  • 14

2 Answers2

2

You could add the required files to your project, set them as "Content" in the properties window and set the Build Action to "Copy if Newer".

You could add a Post-Build action (right-click project, choose properties) to the release and debug configuration to copy the files to the output directory (you can use a macro instead of hard coding, that way the right destination is always used, also when it is edited in the project settings). A simple copy .\Files\*.* $(TargetDir) would probably work. Any command you can execute from the command line works here as well.

The preferred way:

You could add a Post-Build target (right-click project, unload project, rightclick unloaded project, edit project) and use the msbuild <copy> tasks to copy files from one location to another. You can again use a macro such as $(OutDir) or $(TargetDir) or $(Platform) and $(Configuration).

Community
  • 1
  • 1
jessehouwing
  • 106,458
  • 22
  • 256
  • 341
0

I had the same problem and I did something like this:

XCOPY "$(ProjectDir)resources\libraries\xulrunner" "$(TargetDir)xulrunner" /E /I /Y /R

and it works perfecly. Now I have xulrunner in specified 'xulrunner' direcotry located in Debug/Release output directory so xulrunner files aren't mixed with app libs. Remember to set new xulrunner directory in Xpcom.Initialize call.

Przemysław Michalski
  • 9,627
  • 7
  • 31
  • 37