Title Image

Don Xml's Grok This

The home of Don Demsak
Welcome to Don Xml's Grok This Sign in | Help
in Search

This Blog

Syndication

Site Sponsors

DonXml's All Things Techie

NUnit Testing and Application.LocalUserAppDataPath Property

Here’s a note to myself (and for anyone else that is doing Test Driven Development).  If you are using the Application.LocalUserAppDataPath property, when running tests, the properties value will not be the same as if you are running in the application.  That’s because LocalUserAppDataPath is built the following way: Base Path\ CompanyName\ ProductName\ ProductVersion, and the CompanyName, ProductName, and ProductVersion are all derived from the AppDomain.  The AppDomain gets this info from the AssemblyInfo attributes of the exe, not the dll.  Since I was testing a dll, the tests failed, since the exe that created the AppDomain was generated by my testing tool (TestDriven.Net), which did not have any of the AssemblyInfo attributes set.  The result was that the Application.LocalUserAppDataPath was User\1.0.0.0.  I’ve got to send a request to Jamie, and see if we can update the ProcessInvocation.exe to reflect the AssemblyInfo in the dll that is being tested.
Published Thursday, May 05, 2005 8:25 PM by donxml
Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

Peter Provost said:

This important thing here that I have been pressuring Jamie on is to make sure that TD.NET does whatever the official runner does. So for NUnit, make sure it setup up the same way as NUnit-GUI and NUnit-Console. For MbUnit, make sure he sets up the same at tgat runner. For VSTT, the same. That is what matters. If Jamie does it your way, but your way is different from NUnit (I'm not saying it is), then your developer experience and the build server will report different results.
May 9, 2005 11:58 AM

Leave a Comment

(required) 
(optional)
(required) 
Submit

About donxml

I’m an independent consultant, specializing in .Net solutions architecture, based out of New Jersey who also doubles as an evangelist for XML, Domain Driven Design, enterprise architecture and .Net. I do not work for Microsoft, the W3C or any other big company that you may know of (at least not yet). I’ve been an indie for over ten years, and although I’ve been tempted a couple times to take a job with companies like Microsoft, I’ve haven’t found something better than my current situation. I work mostly with the large pharmaceuticals that are based here in New Jersey, and usually find myself on long term contracts. Definitely not the prototypical indie consultant, but it lets me dedicate time to my non-income generating activities like the developer community stuff, plus financing open source projects like XPathmania and MVP-XML. If you would like to talk to me about doing some contract work, just contact me via the contact page. My rates vary widely, depending on lots of different variables, but mostly distance from Jersey, and type of work. Plus, I’ve been known to donate some of my code for various projects.
Powered by Community Server, by Telligent Systems