473,761 Members | 4,511 Online
Bytes | Software Development & Data Engineering Community
+ 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 1679

"Dave L" <Da***@discussi ons.microsoft.c om> wrote in message
news:B5******** *************** ***********@mic rosoft.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***@discussi ons.microsoft.c om> wrote in message
news:C1******** *************** ***********@mic rosoft.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 PrePostBuildRul es 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 ReCreateCommand s.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 PrePostBuildRul es 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
2903
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 tedious and often broke. It was also very slow. What I do now is to pkzip the folder up, ftp the pkzip’ed data to remote, and then unzip it there, which recreates the directories and files.
4
4378
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 loading phase seems quite efficient and seems to be well parallelized. But the build phase is long and seems to use only one processor. Very low IO wait occurs during this phase. Is there something can I do to fasten this process? I guess that if the 4...
4
2479
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 file is executed." 3'rd project is builded.
10
2949
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
288
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 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...
6
1577
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", strScript) End If looking to kick off a script from inside a codebehind, but conditionally not on an onClick event.
4
5943
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 the Microsoft Script Editor and I can set a breakpoint, step through code, inspect variables, etc... with no problem. On a machine where I am trying to debug this problem I am running Windows 2000 Pro with IE 6. I installed the Microsoft...
3
2089
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 Abhi
3
1989
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 prints success or not, but here "return 1", throwa an error "./build: line 17: return: can only `return' from a function or sourced script", any idea?. I did issue command "cat build" below. any iddue with "return 1"?. $ cat build make clean make...
0
9554
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9989
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9925
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9811
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8814
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7358
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6640
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
3
3509
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2788
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.