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

How to run a script during a VS.NET build?

P: n/a
I have a VB.NET 2003 solution with several Windows forms projects and a
deployment project. All of that works ok.

I need to run an external script or program during the build process. It
could be done as part of each project or as a separate project that is built
immediately before the deployment project. I can code everything that I need
into the script/program, so the calling interface isn't very important.

How can I do that? The only solution that I've come up with so far is to
use a CustomTool on a dummy file. However, that seems like a lot of work
(create and register the tool for a single build) for what I'm after.

Any other ideas of how I can run an external tool during the build process?
I'm interested in either VS.NET supported mechanisms and third-party software
that would integrate with VS.NET.

Thanks,
Dave L

Jul 21 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a

"Dave L" <Da***@discussions.microsoft.com> wrote in message
news:B5**********************************@microsof t.com...
I have a VB.NET 2003 solution with several Windows forms projects and a
deployment project. All of that works ok.

I need to run an external script or program during the build process. It
could be done as part of each project or as a separate project that is built immediately before the deployment project. I can code everything that I need into the script/program, so the calling interface isn't very important.

How can I do that? The only solution that I've come up with so far is to
use a CustomTool on a dummy file. However, that seems like a lot of work
(create and register the tool for a single build) for what I'm after.

Any other ideas of how I can run an external tool during the build process? I'm interested in either VS.NET supported mechanisms and third-party software that would integrate with VS.NET.

Thanks,
Dave L

What does this script do? It seems as if you want to do something that
should be done by an installer

/Fredrik
Jul 21 '05 #2

P: n/a

The script does stuff that is part of the build process -- it creates files
that are included into the deployment process and the msi file. The created
file is a transformation of something else -- just like compiling source into
an exe. Doing it in the installer is to late.

Dave L
"Fredrik Wahlgren" wrote:

What does this script do? It seems as if you want to do something that
should be done by an installer

/Fredrik

Jul 21 '05 #3

P: n/a

"Dave L" <Da***@discussions.microsoft.com> wrote in message
news:C1**********************************@microsof t.com...

The script does stuff that is part of the build process -- it creates files that are included into the deployment process and the msi file. The created file is a transformation of something else -- just like compiling source into an exe. Doing it in the installer is to late.

Dave L

Hmm. so these files contain something that *has* to be decided at run time?
I have never herd abous this kind of problem. I can't come up with any kind
of solution but I would be interested in knowing more about the content of
these files.

/Fredrik
Jul 21 '05 #4

P: n/a
Maybe PrePostBuildRules Add-in from MSDN samples
http://www.microsoft.com/downloads/d...displaylang=en
can do what you need. You can specify prebuild or postbuild rules for
your project, e.g. obfuscation of your assemblies. From what you wrote,
you can specify postbuild rules for each of your project or prebuild
rule for your deployment project.

--
Peter Macej
Helixoft - http://www.vbdocman.com
VBdocman - Automatic generator of technical documentation for VB, VB
..NET and ASP .NET code
Jul 21 '05 #5

P: n/a
I've been trying to use this add-in, and followed the instructions to the
letter, but I get no "BuildRules" item appearing on the Tools menu as it
says should happen. Any ideas as to the problem?
Jul 21 '05 #6

P: n/a
I've got slightly further, in that I saw the part in the code itself about
running devenv /setup which I did (there is no setup project as part of the
download as the code comments reckon, nor any ReCreateCommands.reg file).
Now when I start up VisualStudio it barfs about the BuildRules add-in
causing an exception. Any ideas?
Jul 21 '05 #7

P: n/a
Thanks for the pointer Peter! This is exactly what I'm looking for. I
installed it and it appears to work fine. However, it allows me to create
rules for the solution and for each compilation project, but not for the
deployment project as you suggested. Should I be looking for a problem here
or are deployment projects not really available?

Thanks,
Dave L

"Peter Macej" wrote:
Maybe PrePostBuildRules Add-in from MSDN samples
http://www.microsoft.com/downloads/d...displaylang=en
can do what you need. You can specify prebuild or postbuild rules for
your project, e.g. obfuscation of your assemblies. From what you wrote,
you can specify postbuild rules for each of your project or prebuild
rule for your deployment project.

--
Peter Macej
Helixoft - http://www.vbdocman.com
VBdocman - Automatic generator of technical documentation for VB, VB
..NET and ASP .NET code

Jul 21 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.