Visual Studio Team Developer - Undocumented feature in Unit Testing
During my whirl-wind tour of Whidbey I am taking the ride using VSTD (there is a joke ther somewhere <STD>). Coming from NUnit / TDD.net and VS 2003, I was used to dealing with configuration through the configuration file myassembly.dll.config. Now that I am using the tests from VS and looking at the new System.Configuration goo (tech term), I thought this feature was gone because I could not find any documentation. Boy, was I wrong.
All you have to do is create an App.config file, rename it to your assembly name .dll.conig and set the file to always be copied (click file and then look at the properties window, there is a drop down for that option), and by magic, the test runner uses this file.
Hope this helps someone out there.
Now playing: King Crimson - Fallen Angel
Comments
- Anonymous
April 29, 2005
Scott talks
about a feature that is "still there" in the current build.
It is something... - Anonymous
May 03, 2005
Yes it helps - its the only reference I can find on setting up enterprise library and NUnit with VS 2003. But I would appreciate a litte help There's a clue in your myassembly.dll.config comment - and another somewhere about setting up a DebugUnitTest build type - but not enough for me to get my tests running - they don't pick up the app block's config, and fail at the first entlib call. - Anonymous
May 03, 2005
OK I solved that issue - its copying the App.config to the NUnit bin directory and renaming it to mytest.dll.config, AND the important bit, also copy the EntLib config files to the NUnit bin directory. Here are the copy statements from my post-build statements for clarity
COPY "$(SolutionDir)SchemeData*.config" "$(SolutionDir)SchemeDatabin"
COPY "$(SolutionDir)SchemeDataApp.config" "$(SolutionDir)NUnit_SchemeDatabinNUnit_SchemeData.dll.config"
COPY "$(SolutionDir)SchemeDatadataConfiguration.config" "$(SolutionDir)NUnit_SchemeDatabindataConfiguration.config" - Anonymous
May 16, 2005
Visual Studio Team System
The big news around Team System at the moment is the announcement on Rick...