XIDE: copy none build file to output directory

This forum is meant for questions and discussions about the X# language and tools
Post Reply
User avatar
SHirsch
Posts: 286
Joined: Tue Jan 30, 2018 8:23 am
Location: Germany

XIDE: copy none build file to output directory

Post by SHirsch »

Hi Chris,

as you know I'm using XIDE. My question today: is there an easy way to have none code files copied to output directory?
Background: I have script and config files included in the project. I'm changing them inside of XIDE. When I'm compiling the project it would be very good to have them automatically copied to the output directory. At the moment I copy them manually.

If there is no easy way: My suggestion is to implement another Build Type 'copy to output folder'.

Regards,
Stefan
User avatar
lumberjack
Posts: 727
Joined: Fri Sep 25, 2015 3:11 pm
Location: South Africa

XIDE: copy none build file to output directory

Post by lumberjack »

Hi Stefan,
You can copy them to your output folder e.g. BinDebug and reference them from there. If you Add existing file, just point to those and when prompted they not in the Project folder, do you want to copy, say no. They then permanently stay in the output folder. Better even, make a folder in the Debug and Release folders to have them seperate from the outputs. Adapt your code to read from these folders.

HTH,
______________________
Johan Nel
Boshof, South Africa
User avatar
SHirsch
Posts: 286
Joined: Tue Jan 30, 2018 8:23 am
Location: Germany

XIDE: copy none build file to output directory

Post by SHirsch »

Hi Johan,

I thought about that too but that would be outside of my git repo. And I like to have them also under source control.

Stefan
User avatar
lumberjack
Posts: 727
Joined: Fri Sep 25, 2015 3:11 pm
Location: South Africa

XIDE: copy none build file to output directory

Post by lumberjack »

Hi Stefan,
In the application properties, on the advance tab, there is the post build events. Just create a small bat file that copies the files over...
Add it to the post build events.

//OutputCopy.bat
copy *.ext c:xideprojects....
______________________
Johan Nel
Boshof, South Africa
User avatar
Chris
Posts: 4906
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

XIDE: copy none build file to output directory

Post by Chris »

Stefan, yeah I would do exactly what Johan says, add a Post Build event, this is exactly their purpose. Does that suit you?
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
Post Reply