Discussão Geral Text Transformation of a Table called CON

  • terça-feira, 6 de março de 2012 16:46
     
      Contém Código

    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.


Todas as Respostas

  • terça-feira, 6 de março de 2012 18:12
     
     

    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".

  • quarta-feira, 7 de março de 2012 08:38
     
     

    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! 

  • quarta-feira, 7 de março de 2012 08:53
    Moderador
     
     

    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.