If your post-build events are all named PostBuildEvent.bat,
you could also try replacing the .bat file for all your
projects with a blank one after you get the source from
VSS, then run the nant build. 

example workflow
1. get all from VSS
2. use <copy> task with nested <fileset> to copy all
PostBuildEvent.bat files from working directory to some
backup location
3. use <foreach> element to loop through the
postBuildEvent.bat files in the <fileset> from step 2,
replacing each one with an empty PostBuildEvent.bat
4. Run the build as you do now, with the exception that now
you use nant's <solution> task, and set the "outputdir"
attribute to the final bin folder
5. use <copy> task with nested <fileset> again, this time
copying the PostBuildEvent.bat files from the backup
location back to the original locations. 
6. create zip
7. copy to Florida

--- Adam Gritt <[EMAIL PROTECTED]> wrote:

> I do have a clean setup for the script but I can't do a
> clean of the final
> destination as the original developers allowed circular
> references to creap
> into the project and until I am able to get those cleaned
> out I can't do a
> complete clean of the final destination folder.  Thanks
> for the help though.
> 
> On 6/9/06, Marc Towersap <[EMAIL PROTECTED]> wrote:
> >
> > Have you tried cleaning out everything prior to
> building, both in local
> > bins and in the final destination build?  Relying on
> VS's cleans probably
> > just cleans out the local bins (except for asp.net 2.0
> apps).  If you
> > delete all the built files whereever they end up at
> during a build prior to
> > building, does that solve your problem?
> >
> > What I ended up doing was breaking builds into three
> pieces, a clean
> > portion, a build portion, and a stage portion, where
> the stage portion
> > copies stuff from the various locations into a commmon
> directory.  The
> > clean's either call the clean option for devenv, or
> just delete directories
> > that house the compiled files.  The staging portion is
> very easy to do in
> > NAnt, as you can easily filter out exactly what you
> want to copy
> > (exe/dll/pdb/config etc.).
> >
> > Marc Towersap Sr. SCM Engineer
> >
> > ----- Original Message ----
> > From: Adam Gritt <[EMAIL PROTECTED]>
> > To: nant-users@lists.sourceforge.net
> > Sent: Friday, June 9, 2006 10:40:27 AM
> > Subject: Re: [NAnt-users] Pre/Post Build Events
> >
> > I have the build file set up as follows:
> >
> > <target>
> >     <solution>
> >         <project/>
> >         ...
> >     </solution>
> > </target>
> >
> > We are running a dis-jointed environment.  Our code is
> in VSS but due to
> > the fact that the network is Novell and we have offices
> in Wisconsin and
> > Florida, those in the Florida office have trouble
> accessing VSS because it
> > is slow so each night the build process is as follows:
> >
> > Get all from VSS
> > Run Build
> > Create Zip File of whole directory
> > copy zip file to Florida
> >
> > Everyone then gets the zip file and uses the code from
> there so the
> > projects are not connected to VSS.  Since the Post
> build events are not the
> > same across the projects I would have to creating
> something to remove the
> > build events, build, and then reget the project files
> from vss to restore
> > the build events.  This is doable but can create other
> issues.  Our current
> > build tool (which is an in house one) currently looks
> at a xml document of a
> > list of the solutions, opens each solution in VS via
> the COM object model,
> > does a build and disposes of the object.  This makes
> things very slow to
> > build on the local workstations.  I am trying to get
> things switched over to
> > NAnt to speed things up and to make the builds more
> consistant.
> >
> > I guess the best thing to do then would be to create an
> app that modifies
> > all the proj files to do the post build event the same
> and to only copy the
> > output dll and pdb file, as there are some that do a
> *.* copy unless someone
> > has a better suggestion?
> >
> > Adam Gritt
> >
> >
> > On 6/9/06, Giscard Biamby <[EMAIL PROTECTED]> wrote:
> > >
> > > You can write a program that goes through all your
> > > projects' .csproj files and removes the value for the
> > > PostBuildEvent attribute under the
> > > VisualStudioProject-->CSHARP-->Build-->Settings xml
> node.
> > >
> > > If you need the ability to re-enable the post build
> event
> > > for when developers are working from the IDE, you can
> also
> > > give your program the ability to add and remove the
> value
> > > "PostBuildEvent.bat" to the attribute I mentioned
> above.
> > >
> > > I'm not sure what's causing the sharing violation,
> are you
> > > using the <solution> task to build the projects? If
> so, it
> > > might still have a lock on the files in the final bin
> > > folder.
> > >
> > > --- Adam Gritt < [EMAIL PROTECTED]> wrote:
> > >
> > > > The problem I am running into is that some of the
> build
> > > > events we have copy
> > > > files to the final bin directory from the local bin
> > > > directories.  When some
> > > > projects build it gives an error saying that the
> build
> > > > event failed because
> > > > it could not overwrite a file because of a sharing
> > > > violation.  In the end
> > > > Nant says that the build failed because of the post
> build
> > > > events failing.  I
> > > > am stuck trying to figure out the best way to solve
> the
> > > > problem.  The hard
> > > > part is we have around 190 projects that would have
> to be
> > > > gone through and
> > > > have the post build events changed but I am not
> sure if
> > > > this would
> > > > completely solve the issue as I don't know what is
> really
> > > > causing the
> > > > sharing violations when the items are being copied.
>  Any
> > > > suggestions?
> > > >
> > > > Adam Gritt
> > > >
> > > > On 6/1/06, Gert Driesen <[EMAIL PROTECTED]>
> wrote:
> > > > >
> > > > >
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: [EMAIL PROTECTED]
> > > > > > [mailto:[EMAIL PROTECTED]
> ] On
> > > > Behalf Of
> > > > > > Adam Gritt
> > > > > > Sent: woensdag 31 mei 2006 17:56
> > > > > > To: nant-users@lists.sourceforge.net
> > > > > > Subject: [NAnt-users] Pre/Post Build Events
> > > > > >
> > > > > > I am working with about 190 projects that we
> are
> > > > converting
> > > > > > to using NAnt to build with.  The problem is
> that
> > > > some of the
> > > > > > projects have Pre/Post build events that are
> used to
> > > > copy the
> > > > > > outputs to the proper directories when
> developing.
> > > > Not all of
> > > > > > the projects implement the build events.  Is
> there a
> > > > switch
> > > > > > somewhere in NAnt to enable/disable execution
> of the
> > > > build
> > > > > > events because if the build event fails it
> shows the
> > > > project
> > > > > > as failing to build in NAnt.
> > > > >
> > > > > No, this is not possible at the moment and I'd
> like to
> > > > avoid adding a
> > > > > switch
> > > > > for this.
> > > > >
> > > > > Gert
> > > > >
> > > > >
> 
=== message truncated ===> >
_______________________________________________
> NAnt-users mailing list
> NAnt-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nant-users
> 


"Few are those who see with their own eyes and feel with their own hearts." 
-Albert Einstein

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to