vs.net BUG

  • Thread starter Thread starter David Gacek
  • Start date Start date
D

David Gacek

Try to create a new windows form app
named prn and you will get this error

---------------------------
Microsoft Development Environment
---------------------------
Projects and solutions cannot be named '.' or '..', nor can their names
contain any of the following characters:

/ ? : & \ * " < > | # %

Please enter a valid name.
---------------------------
OK
---------------------------

using Vs.net 2003 and have also confirmed this on vs.net 2005 beta 1 with
the following error

---------------------------
Microsoft Development Environment
---------------------------
Projects and solutions cannot be named '.' or '..', nor can their names
contain any of the following characters:

/ ? : & \ * " < > | # %

Please enter a valid name.
 
Did more testing and found this particular name affects not only the windows
forms app but the Class library,Windows Control Library,Console
application,Pocket Pc application,Pocket Pc Class library,.. All Pocket Pc
Apps and Smart Phone Apps
 
.... and the Windows Service
David Gacek said:
Did more testing and found this particular name affects not only the windows
forms app but the Class library,Windows Control Library,Console
application,Pocket Pc application,Pocket Pc Class library,.. All Pocket Pc
Apps and Smart Phone Apps
 
Try to create a new windows form app
named prn and you will get this error

---------------------------
Microsoft Development Environment
---------------------------
Projects and solutions cannot be named '.' or '..', nor can their names
contain any of the following characters:

/ ? : & \ * " < > | # %

Please enter a valid name.
---------------------------
OK
---------------------------

using Vs.net 2003 and have also confirmed this on vs.net 2005 beta 1 with
the following error

---------------------------
Microsoft Development Environment
---------------------------
Projects and solutions cannot be named '.' or '..', nor can their names
contain any of the following characters:

/ ? : & \ * " < > | # %

Please enter a valid name.

I believe that PRN is an illegal file name on windows period.... I
don't have my windows system up right now - but, you can test this by
simply creating a new text file and then try to rename it to prn.
 
i suspect you might be right but its not like i'm naming it just to prn it
will have an extension depending on the project created.
 
I believe that PRN is an illegal file name on windows period.... I
don't have my windows system up right now - but, you can test this by
simply creating a new text file and then try to rename it to prn.

Ya, there's a whole wack of reserved while names:

CON, AUX, COM1, COM2, COM3, COM4, LPT1, LPT2, LPT3, PRN, NUL

So the VS.NET issue isn't really a bug - PRN is a documented reserved word.




http://www.microsoft.com/resources/documentation/Windows/XP/all/reskit/en-
us/Default.asp?url=/resources/documentation/Windows/XP/all/reskit/en-
us/prkc_fil_rbrx.asp
 
prn is a shortcut name that was used, and may still be used to refer to LPT1
when trying to print using command line apps

Text.txt > prn

would send the file as raw text to the LPT1 port. This is why it is an
illegal name.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top