No system.io - - opening files in VB.net pocket pc.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All,
Following on from the other thread (the forum gives me an error what I try
and reply to that thread).

My problem might be that I do not seem to have system.io as a reference nor
can I add it by right clicking on references - system.io is not in the list.
When I try and to dimension the sreamreader in my code I get an 'is not
declared' error for Streamreader, plus all the other key words associated
with system.io.

Anyone know why I don't have system.io (I am using VS.net and do not have
system.io in the non-smart device apps I have been working on either).

Thanks in advance.

Roger.
 
I will try that tomorrow, I'm a bit fed up with the whole thing right now. As
far as I know everything else seems to be working fine. How would I go about
a re-install, would I need to do all the MSDN stuff or just uninstall studio
and re-install it.

Thanks, Roger.
 
System.IO is a namespace, not a seperate assembly so it won't appear in the
Add Reference dialog. mscorlib.dll contains the basic System.IO
functionality and should be added to all projects as a reference by default.
To directly work with classes in the System.IO namespace without having to
refer to them using their full namespace each time add either the Imports
(VB) or using (C#) statement at the top of your code file e.g.

[VB]
Imports System.IO

[C#]
using System.IO;

Within a VB project you can also define Imports for the entire project from
the project properties dialog.

Peter
 
You have to provide the full path (there is no current directory on CE).

Cheers
Daniel
--
http://www.danielmoth.com/Blog/


Roger said:
Thanks very much, I added system.io right at the top of the code and now
the
app will compile without errors. I now have a file not found exception -
do
you know path I should use, I have tried dropping the file in the app
folder
(manually), then open the file from within my app with no path - this
aleways
seemed to work with other VB versions.

Thanks again, Roger.

Peter Foot said:
System.IO is a namespace, not a seperate assembly so it won't appear in
the
Add Reference dialog. mscorlib.dll contains the basic System.IO
functionality and should be added to all projects as a reference by
default.
To directly work with classes in the System.IO namespace without having
to
refer to them using their full namespace each time add either the Imports
(VB) or using (C#) statement at the top of your code file e.g.

[VB]
Imports System.IO

[C#]
using System.IO;

Within a VB project you can also define Imports for the entire project
from
the project properties dialog.

Peter

--
Peter Foot
Windows Embedded MVP
www.inthehand.com | www.opennetcf.org

Roger said:
Hi All,
Following on from the other thread (the forum gives me an error what I
try
and reply to that thread).

My problem might be that I do not seem to have system.io as a reference
nor
can I add it by right clicking on references - system.io is not in the
list.
When I try and to dimension the sreamreader in my code I get an 'is not
declared' error for Streamreader, plus all the other key words
associated
with system.io.

Anyone know why I don't have system.io (I am using VS.net and do not
have
system.io in the non-smart device apps I have been working on either).

Thanks in advance.

Roger.
 
Thanks very much, I added system.io right at the top of the code and now the
app will compile without errors. I now have a file not found exception - do
you know path I should use, I have tried dropping the file in the app folder
(manually), then open the file from within my app with no path - this aleways
seemed to work with other VB versions.

Thanks again, Roger.

Peter Foot said:
System.IO is a namespace, not a seperate assembly so it won't appear in the
Add Reference dialog. mscorlib.dll contains the basic System.IO
functionality and should be added to all projects as a reference by default.
To directly work with classes in the System.IO namespace without having to
refer to them using their full namespace each time add either the Imports
(VB) or using (C#) statement at the top of your code file e.g.

[VB]
Imports System.IO

[C#]
using System.IO;

Within a VB project you can also define Imports for the entire project from
the project properties dialog.

Peter

--
Peter Foot
Windows Embedded MVP
www.inthehand.com | www.opennetcf.org

Roger said:
Hi All,
Following on from the other thread (the forum gives me an error what I try
and reply to that thread).

My problem might be that I do not seem to have system.io as a reference
nor
can I add it by right clicking on references - system.io is not in the
list.
When I try and to dimension the sreamreader in my code I get an 'is not
declared' error for Streamreader, plus all the other key words associated
with system.io.

Anyone know why I don't have system.io (I am using VS.net and do not have
system.io in the non-smart device apps I have been working on either).

Thanks in advance.

Roger.
 
I'm finally up and running.

Thanks to all for your help.

Roger.


Daniel Moth said:
You have to provide the full path (there is no current directory on CE).

Cheers
Daniel
--
http://www.danielmoth.com/Blog/


Roger said:
Thanks very much, I added system.io right at the top of the code and now
the
app will compile without errors. I now have a file not found exception -
do
you know path I should use, I have tried dropping the file in the app
folder
(manually), then open the file from within my app with no path - this
aleways
seemed to work with other VB versions.

Thanks again, Roger.

Peter Foot said:
System.IO is a namespace, not a seperate assembly so it won't appear in
the
Add Reference dialog. mscorlib.dll contains the basic System.IO
functionality and should be added to all projects as a reference by
default.
To directly work with classes in the System.IO namespace without having
to
refer to them using their full namespace each time add either the Imports
(VB) or using (C#) statement at the top of your code file e.g.

[VB]
Imports System.IO

[C#]
using System.IO;

Within a VB project you can also define Imports for the entire project
from
the project properties dialog.

Peter

--
Peter Foot
Windows Embedded MVP
www.inthehand.com | www.opennetcf.org

Hi All,
Following on from the other thread (the forum gives me an error what I
try
and reply to that thread).

My problem might be that I do not seem to have system.io as a reference
nor
can I add it by right clicking on references - system.io is not in the
list.
When I try and to dimension the sreamreader in my code I get an 'is not
declared' error for Streamreader, plus all the other key words
associated
with system.io.

Anyone know why I don't have system.io (I am using VS.net and do not
have
system.io in the non-smart device apps I have been working on either).

Thanks in advance.

Roger.
 
Back
Top