Bugs item #1558571, was opened at 2006-09-14 08:28
Message generated for change (Comment added) made by garyfx
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1558571&group_id=31650

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 7
Submitted By: coolpero2 (coolpero2)
Assigned to: Nobody/Anonymous (nobody)
Summary: Bad value in Application.CompanyName property

Initial Comment:

I'm running NANT 2.2.8 for .NET 1.1 
and have a test case that at some point reads property  
System.Windows.Forms.Application.UserAppDataPath.

Getter of this property creates a directory if it
doesn't exists and the name of the directory is derived
from
Base Path\CompanyName\ProductName\ProductVersion (look
at
http://msdn2.microsoft.com/en-us/library/system.windows.forms.application.userappdatapath.aspx
).

The thing is that when running nant from command line
value of Application.CompanyName =
http://nant.sourceforge.net
and : and / are not permitted for folder names.

Plase correct this in next release.

Otherwise compliments to all developers for excelent tool.

Greetings, Petar Repac


----------------------------------------------------------------------

>Comment By: Gary Feldman (garyfx)
Date: 2006-10-17 10:54

Message:
Logged In: YES 
user_id=847172

While I suppose there may be better choices for the company
name, as far as I know there are no constraints on the
CompanyName attribute prohibiting special characters.  The
problem comes in when you try to adhere to Microsoft's
guidelines about where to put application data, and use the
CompanyName attribute as the company name folder.

The reality is that you can't assume that the company name
will be a valid folder name.  If you're writing code that is
using the CompanyName attribute, where you don't control its
values, then you're forced to process the result to make it
a legal folder name.

But my guess is that you do control the attribute in the
final product, just not in the test system.  But such a test
case would break anyway, since you don't want the result to
be NAnt, you want it to be your own company name.

This is one example of a common testing problem, where the
test isn't running in the final environment.  There are a
number of ways around this, but they generally boil down to
having the test system control the environment.  One way
around this is to simply have a really simple CompanyName
class that can be mocked by the tests, and then rely upon
formal code review instead of tests to validate that
particular class.

The other alternative is to simply not use the CompanyName
attribute for this folder.  Presumably it's a name you
control, and thus you can hardwire it, possibly even in the
same source file as your own CompanyName attribute declaration.


----------------------------------------------------------------------

Comment By: coolpero2 (coolpero2)
Date: 2006-09-14 10:22

Message:
Logged In: YES 
user_id=1598059

I already corrected my mistake in comment below.
I'm running 
NAnt 0.85 (Build 0.85.2344.0; rc4; 02.06.2006).


----------------------------------------------------------------------

Comment By: coolpero2 (coolpero2)
Date: 2006-09-14 10:20

Message:
Logged In: YES 
user_id=1598059

I already corrected my mistake in comment below.
I'm running 
NAnt 0.85 (Build 0.85.2344.0; rc4; 02.06.2006).


----------------------------------------------------------------------

Comment By: Gary Feldman (garyfx)
Date: 2006-09-14 10:16

Message:
Logged In: YES 
user_id=847172

I don't see any 2.2.8 listed among the release packages, and
it certainly doesn't look like any NAnt version number
(which would begin with a 0).  

Please check the version number again.  You should be
running either 0.85-rc4 or a more recent nightly build.  Let
us know either way.


----------------------------------------------------------------------

Comment By: coolpero2 (coolpero2)
Date: 2006-09-14 09:28

Message:
Logged In: YES 
user_id=1598059

Sorry, I made a mistake.
The version of NAnt is 
NAnt 0.85 (Build 0.85.2344.0; rc4; 02.06.2006).

NUnit used was 2.2.8.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1558571&group_id=31650

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to