Text Transformation of a Table called CON
-
Tuesday, March 06, 2012 4:46 PM
Having created an EF4 model comprising 15 tables from an existing SQL database, I ran the DBContext code generation to create my classes and ran into this error:
Running transformation: System.ArgumentException: FileStream will not open Win32 devices such as disk partitions and tape drives. Avoid use of "\\.\" in the path.
I narrowed it down to a single table called CON but there was nothing out of the ordinary with the table. I eventually discovered that renaming it CONZ resolved the issue so my assumption is that CON is a reserved word in the text transformation process. It would be good if someone could confirm this or provide an alternative explanation.
All Replies
-
Tuesday, March 06, 2012 6:12 PM
Hi,
This is an MS-DOS device : http://en.wikipedia.org/wiki/Device_file#Device_files. At least this is what GrandMa told me. I'm not that old myself or am I ? ;-)
Please always mark whatever response solved your issue so that the thread is properly marked as "Answered".
-
Wednesday, March 07, 2012 8:38 AM
Thanks Patrice, I tested your theory by renaming my table to PRN and AUX and it failed with the same error on both occasions so it looks like you were spot on!
-
Wednesday, March 07, 2012 8:53 AMModerator
Hi,
Thanks @Patrice!
Have a nice day.
Alan Chen[MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.


