Run external program during BUILD?

  • Thread starter Thread starter Dmitry Duginov
  • Start date Start date
D

Dmitry Duginov

My web application uses resource files to keep localized strings etc. Those
resource files prepared by external console program, which extracts this
stuff from the database.

Is there a way to invoke that program automatically after I hit build
(rebuild) button in Visual Studio, before VSS actually trying to build the
solution?

I'm working with Whidbey beta 2.

Thanks in advance,
Dmitry
 
Hi Dimitry:

Yes, there are 'pre' and 'post' 'build events' in which you can
execute external programs. You'll find these events defined in the
project configuration, although offhand I don't know if they are
available in all versions (like Express).
 
Scott Allen said:
Hi Dimitry:

Yes, there are 'pre' and 'post' 'build events' in which you can
execute external programs. You'll find these events defined in the
project configuration, although offhand I don't know if they are
available in all versions (like Express).

Of course I looked at project options/configuration, but I couldnt find
those "Pre-build" and "Post-build" options. Could you be more specific?
 
Of course I looked at project options/configuration, but I
couldnt find those "Pre-build" and "Post-build" options. Could
you be more specific?

Dmitry,

Unfortunately, pre-build and post-build events are not available for
C# ASP.Net projects in VS 2003.

There is a way around this, however.

You can use a Visual C++ make file. Here's an article from Microsoft
showing how to do this:

http://support.microsoft.com/default.aspx?scid=kb;en-us;810230
 
Chris R. Timmons said:
Dmitry,

Unfortunately, pre-build and post-build events are not available for
C# ASP.Net projects in VS 2003.

Is it any different in VS 2005?
There is a way around this, however.

You can use a Visual C++ make file. Here's an article from Microsoft
showing how to do this:

http://support.microsoft.com/default.aspx?scid=kb;en-us;810230

Thanks, I'll look at this stuff. But I gotta admit, I'm really surprised
that such a feature is really missing. I though it was not looking
carefully...
 
Yep - I apologize. I thought 2005 had added the feature but I must not
have been working with an ASP.NET app at the time.

The good news is you should be able to hack up the MSBuild file
instead of using a make file, which might be a little easier. I'm
going to look into this because it's something I need to do pretty
soon...
 
in message


Is it any different in VS 2005?

Dmitry,

I don't have VS 2005 yet.
Thanks, I'll look at this stuff. But I gotta admit, I'm really
surprised that such a feature is really missing. I though it was
not looking carefully...

I was also surprised when I discovered that feature was missing. The
Visual C++ makefile works quite well, however.

Chris.
 
Back
Top