By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,459 Members | 1,472 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,459 IT Pros & Developers. It's quick & easy.

how can I execute a batch file during build time ?

P: n/a
With .Net Studio,

I have a solution includes some projects.
I want to execute a batch file during build solution time.
For example,
1'st project is builded.
2'nd project is builded.
" a batch file is executed."
3'rd project is builded.

how can I do this?
how can I include a batch file in the solution?
how can I determine the order in projects and a batch file?

(the projects were written by C# and C++)
Nov 15 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Hi Carrot,

I don't think that IDE will support this, I guess you have to use a batch
file itself for compiling the projects as well..

Just try it that way and see

Nirosh.

"carrot" <ds****@db.konkuk.ac.kr> wrote in message
news:d7**************************@posting.google.c om...
With .Net Studio,

I have a solution includes some projects.
I want to execute a batch file during build solution time.
For example,
1'st project is builded.
2'nd project is builded.
" a batch file is executed."
3'rd project is builded.

how can I do this?
how can I include a batch file in the solution?
how can I determine the order in projects and a batch file?

(the projects were written by C# and C++)

Nov 15 '05 #2

P: n/a
Hi Carrot,

I don't think that IDE will support this, I guess you have to use a batch
file itself for compiling the projects as well..

Just try it that way and see

Nirosh.

"carrot" <ds****@db.konkuk.ac.kr> wrote in message
news:d7**************************@posting.google.c om...
With .Net Studio,

I have a solution includes some projects.
I want to execute a batch file during build solution time.
For example,
1'st project is builded.
2'nd project is builded.
" a batch file is executed."
3'rd project is builded.

how can I do this?
how can I include a batch file in the solution?
how can I determine the order in projects and a batch file?

(the projects were written by C# and C++)

Nov 15 '05 #3

P: n/a
Hi Carrot,

I don't think that IDE will support this, I guess you have to use a batch
file itself for compiling the projects as well..

Just try it that way and see

Nirosh.

"carrot" <ds****@db.konkuk.ac.kr> wrote in message
news:d7**************************@posting.google.c om...
With .Net Studio,

I have a solution includes some projects.
I want to execute a batch file during build solution time.
For example,
1'st project is builded.
2'nd project is builded.
" a batch file is executed."
3'rd project is builded.

how can I do this?
how can I include a batch file in the solution?
how can I determine the order in projects and a batch file?

(the projects were written by C# and C++)

Nov 15 '05 #4

P: n/a
Take a look at the properties of the project. In the Property Pages dialog,
under Common Properties/Build Events there are two properties of interest:
Pre-build Event Command Line and Post-build Event Command Line.

You can put the path and name of your batch file into the Post-build Event
of 2nd project, or Pre-build Event of the 3rd project. This will execute the
batch file between the builds of 2nd and 3rd projects.

The caveat is that managed web projects do not have build events.

If the 2nd and 3rd projects are web projects, then you can hack around the
problem by creating a dummy project. Create a dependency from the 3rd
project to the dummy project, and from the dummy project to the 2nd project.
This ensures that VS.NET builds the dummy project in between the 2nd and 3rd
projects. Then have the Pre-build or Post-build event of the dummy project
call your batch file.

hth,
Sami
"carrot" <ds****@db.konkuk.ac.kr> wrote in message
news:d7**************************@posting.google.c om...
With .Net Studio,

I have a solution includes some projects.
I want to execute a batch file during build solution time.
For example,
1'st project is builded.
2'nd project is builded.
" a batch file is executed."
3'rd project is builded.

how can I do this?
how can I include a batch file in the solution?
how can I determine the order in projects and a batch file?

(the projects were written by C# and C++)

Nov 15 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.