System.IO.File is not a member of system.io.file

Hi,

I am creating a program in vb.net for a handheld scanner and am receiving the following error in my code:

System.IO.File is not a member of system.io.file

I need to be able to write an array of bytes without doing the following:  
System.IO.File.WriteAllBytes("E:\outLabel.pdf", objRes.Label.Data)

Regards,

Ross
ross13Asked:
Who is Participating?
 
Miguel OzSoftware EngineerCommented:
Compact framework does NOT support all System.IO classes and/or methods as they are mobile OS dependent.

Note: If more help needed, please
1) Post what version of .NET compact framework, VS and target mobile OS you are using.

 2) Send a cut down version of your Project. I have VS2010 and VS2013.
0
 
Miguel OzSoftware EngineerCommented:
Uhmm, a bit strange. Please check that you have import System.IO and that a third party library is not introducing a new namespace that conflicts with .NET namespaces.
If more help needed please post your code.
0
 
ross13Author Commented:
I am using the compact framework if that helps.
0
 
ross13Author Commented:
What I ended up doing was creating a web service and passing the byte array to it and generating a .pdf file.
0
 
ross13Author Commented:
Thanks for your help.

Regards,

Ross
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.