Fog Creek Software
Discussion Board




Welcome! and rules

Joel on Software

Including .config files in Builds

Is there an easy way to have the .config file (application configuration file) copied to the release/debug directory whenever you build a project in the IDE?

One would think that by including the .config file in the project and setting it's "BuildAction" property to "Content" would work, but it doesn't.

The documentation on "BuildAction" is a bit sketchy.

Guy Incognito
Friday, March 28, 2003

VS.NET doesn't provide "post-build" actions out of the box. Here's one from Microsoft:

http://microsoft.com/downloads/details.aspx?FamilyId=EE1C9710-6DF7-4F3F-A5AE-425A478DDEEB&displaylang=en

I presume this will be bundled in VS.NET 1.1, but I haven't had the time or desire to check out the beta.

Brad (dotnetguy.techieswithcats.com)
Friday, March 28, 2003

Thanks.  There is a lot of downloads there, any idea if there is a page that explains what your downloading before you download it?

Guy Incognito
Saturday, March 29, 2003

Oh, sorry. It's the BuildRules utility.

Brad (dotnetguy.techieswithcats.com)
Saturday, March 29, 2003

VS .NET 1.1 rolls in post-build actions for C#, but not for VB .NET.

I find that I'm much happier using an external build utility to get complete flexibility; I use FinalBuilder, but there's also NAnt and BuildIt out there.

Mike Gunderloy
Sunday, March 30, 2003

The problem I had with NAnt was that I loved it too much. :) When I had to start coding with others, I was more or less forced to move to the VS.NET project system, because that's what everybody else wanted to use.

I have it on the back-burner to leverage non-building C# projects in concert with a "custom" C++ project that calls Slingshot and then NAnt, so we get some build sanity but preserve the internal build system of VS.NET. I just haven't gotten around to it yet...

Brad (dotnetguy.techieswithcats.com)
Sunday, March 30, 2003

If you name the file "app.config", it will automatically be renamed appropriately and copied to the correct folder during compilation.

Ryan LaNeve
Monday, March 31, 2003

Ryan, thanks... That is exactly what I was looking for!

Guy Incognito
Monday, April 07, 2003

*  Recent Topics

*  Fog Creek Home