hcurrie
8/13/2008 3:35:00 PM
>
> > VS2008 Windows Forms
> > As part of the process of building my application setup program, I would
> > like to make some modifications to certain files. I can easily write the
> > code to do make the necessary changes given a list of filenames, but I'm
> > unsure of the best way to integrate this into my setup project solution.
> > I
> > have had a quick look through the help files, and there seem to be
> > several
> > options (addins, macros, post-build events, etc...) but I'm not sure the
> > best place to start. Any suggestions appreciated.
>
> I'd do this as a part of build process, probably indeed as a post-
> build event. So long as it integrates with MSBuild, it should be fine
> - so that you can set up a dedicated build server without breaking
> things. If your app will also report errors as errorlevel code, its
> errors will be reported as build failures (which is what it should be,
> if this step is necessary to get a working build).
OK. Thanks. I was looking at custom tools, but it all looks really
complicated.
I have managed to get something very simple working using a post build
event, so I shall continue down this route.
As a test I have used a simple dos command to rename some content files in
the project, and that seems to work. So what I need to do now I guess, is to
write a console app to take the filenames as parameters and make the
necessary changes to the files.
Thanks for the tip about reporting build errors. I'm not sure how to set the
errorlevel code, but I'll have a search for this.
Thanks
Phil.