Include xml file in build output

  • Thread starter Thread starter Rob Tillie
  • Start date Start date
R

Rob Tillie

Hello,

I want an xml file, part of the project, be included in the build so that it
gets to debug/bin.
I already set the build action "content", which describes what I want, but
vs.net doesn't deploy it.

Anyone got an idea?

Greetz,
-- Rob.
 
You need to make sure you add a custom action to the
deployment project that will include the XML file.

-Lee
 
Hello,

I don't mean when I'm deploying the app, but just in my Visual Studio IDE. I
have an XML file that it needs, but when I press Run, it builds the app and
puts it in the debug folder. Now I want the IDE to copy my XML file to that
same folder...

Greetz,
-- Rob.
 
Similar to CopyLocal for Add Refernce - but for a content resource,
right? I haven't seen it but am interested if anyone knows of a way
to do it. It would be helpful when you expect a file to be in the
same directory as your application (e.g. in final deployment) but not
so easy when you have a structure. If there isn't a way to copy
local, what other approaches have people done? I just make my own
copies manually, but it's annoying when I change the original
"fileIUse.xml".

ProjectDir
fileIUse.xml (expected to be in app folder)
Source
source1.cs
Bin
Debug
my.exe
copyOfDll.dll
Release
my.exe
copyOfDll.dll
 
Well, I found a workaround. I put the working folder to the project folder,
so it will run the app from the debug folder, but take the files from the
project folder.
But i believe this is done automatically for web projects. I put a couple of
html files in my project, and they are copied to the output directory. But
for my console app, it just doesn't work. There must be a very simple
solution for this I guess, just haven't found it yet.

Greetz,
-- Rob.
 
Back
Top