Building and running UTs in VS.NET

Coordinator
Jul 7, 2007 at 2:19 AM
I just changed the UTs so that they execute NAnt in-process, which is more performant and allows for setting breakpoints in the tasks and having them hit. The only downside with this is that some NAnt DLLs and the NAnt config file need to get copied to the build output file (i.e bin\Debug) in order for NAnt execution to work.

Obviously, we want to do this in a way where there are no absolute paths in the solution so that devs can have their own machine setups. So I made a NAnt build script called PostBuild.build which is executed by the VS.NET post build event. The build file can use the NAnt properties which are automatically set by NAnt to find the DLLs and config files and copy them.

The only issue I see with this is that NAnt\bin has to be in the user's %PATH% because the post build script does not specify a path to NAnt. Are there other issues I'm not forseeing?

Is there any better way to do this that have less moving parts?

~ Justin