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