473,467 Members | 1,554 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

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
7 1657

"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

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

"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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: steve | last post by:
Hi, I finally figured out the best way to synch local and remote script folders, containing many php script files. What I used to do before was try to ftp all the changed files, etc. which was...
4
by: Xela | last post by:
Hi I am facing the following problem. I load a fact table with around 25 millons lines, and 7 indexes. I load it with 3 million line subsets. I am on a quadriprocessor Solaris machine. The...
4
by: carrot | last post by:
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...
10
by: Shai Goldberg | last post by:
Hi, Is there a way to store an SQL script into a resource file, the script contains a lot of lines, and then to read it during run-time into a string? Thanks,
7
by: Dave L | last post by:
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...
6
by: simon | last post by:
hello, what code would i use to kick off a javascript script after i had registered it? If (Not Page.IsClientScriptBlockRegistered("jsScript")) Then Page.RegisterClientScriptBlock("jsScript",...
4
by: aramsey | last post by:
I have a javascript program that works fine under Firefox and on IE when running XP, but is having a problem with IE running under Windows 2000 Pro. On my personal XP development machine I have...
3
by: =?Utf-8?B?QWJoaQ==?= | last post by:
Hi All, I need to write MSBuild script to get latest source code of solution/Projects from TFS server.I m using VS2008. I am new to this, can anyone plz help me how can i do this. Thanks...
3
by: tvnaidu | last post by:
This is my build script, I calls this script from main build script, in case of SUCCESS, everything is ok, but in failure, I do "return 1", so that main build can cheque "$?" and based on that it...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.