Intelligent Post Build Event?

J

Joe Cool

I am developing a multi-function app that depends on an XML file that
defines several data structures and is used by several of the
functions. The app expects the XML file to be in the local
Applications Data folder. I have used this technique before and copied
the XML file from the project folder with a Post Build event. But I
now want to be able to install this app on either XP, Vista or Win7.

This folder is in the same place for Vista and Win7 but is in a
different location on the hard drive for XP. How do I make a post
build event that can copy this file to the proper location no matter
whjich flavor of Windows it is being installed on?
 
F

Felix Palmen

* Joe Cool said:
I am developing a multi-function app that depends on an XML file that
defines several data structures and is used by several of the
functions. The app expects the XML file to be in the local
Applications Data folder. I have used this technique before and copied
the XML file from the project folder with a Post Build event. But I
now want to be able to install this app on either XP, Vista or Win7.

In my understanding, a post build event should just support the build
process or set up things so the compiled program is able to run inside
the IDE debugger. For productive installations, there are for example
setup projects.

But then, where is the file coming from? If I understood you correctly,
it is NOT part of your project?
This folder is in the same place for Vista and Win7 but is in a
different location on the hard drive for XP. How do I make a post

Maybe I'm missing on sth obvious here, but -- why?
build event that can copy this file to the proper location no matter
whjich flavor of Windows it is being installed on?

Maybe you could instead install it to your application's installation
folder and open it from there?

Regards,
Felix
 
J

Joe Cool

In my understanding, a post build event should just support the build
process or set up things so the compiled program is able to run inside
the IDE debugger. For productive installations, there are for example
setup projects.

But then, where is the file coming from? If I understood you correctly,
it is NOT part of your project?

No, it is a member of the project.
Maybe I'm missing on sth obvious here, but -- why?


Maybe you could instead install it to your application's installation
folder and open it from there?

The setup project will install the file in the proper place, I just
wanted a convient way to make sure the file is up to date each time I
run the app from VS.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top