Bite my bytes

What I learn by day I blog at night - A blog from Microsoft Consultant working from Ljubljana, Slovenia

  Home :: Contact :: Syndication  
  999 Posts :: 7691 Comments :: 235 Trackbacks

Search

Most popular posts
in last 30 days

Categories

My Projects

Archives

Stuff


Copyright © by David Vidmar
 
Contact me!
 
LinkedIn Profile
 
 
 

Warning! Hard geeky stuff ahead. I think even I will not understand what I wanted to write after few days…

I have .NET solution with multiple projects and multiple unit test projects. All unit test project share the same configuration and I don’t want to maintain multiple config files.

So I finally whipped myself together this nice little “relative” post build event that copies UnitTest.config from the parent (solution directory) in output directories of unit test projects and renames the file accordingly.

It wouldn’t be a big deal if NAnt would have different working directory than VS when running post build events. So it’s essential to use post build macros! And with using macros this can be the same accross multiple projects.

xcopy $(SolutionDir)UnitTest.config $(ProjectDir)$(OutDir) /Y
del $(ProjectDir)$(OutDir)$(TargetFileName).config
ren $(ProjectDir)$(OutDir)UnitTest.config $(TargetFileName).config
Posted on Saturday, February 25, 2006 11:28 AM | Filed under: Developement |
Comments have been closed on this topic.