RR,
contents = My.Computer.FileSystem.ReadAllText("c:\mytextfile.txt")
I see you are using VB 2005 which is still in Beta at this time...
Just an anecdote from my personal experience:
I've been working for over two years on a project in Asp.net (a Spanish
accounting program, you can visit it at
www.conta.net - if you understand
Spanish). Anyway, in July I was attending TechEd 2005 in Amsterdam and they
were going on about all these wild and worderful new things that VS2005
does. So, I thought, why not give it a go. Now I must say that I am not at
all ignorant of the dangers of installing a Beta product. I got very badly
burned by the VB5CCE Beta, and I remember that at the time MS wouldn't even
say they were sorry after blowing up many developers VB4 production
machines. They said that it was understood that you don't install Beta
software on a production machine. But, to continue on with my story, I was
in Amstertam, I had my trusty production machine with me, and I had made
backups of everything before leaving, and I was feeling like living
dangerously. I figured that in a worst case scenario, I could always just
format the HD and reinstall everything. So I pulled out the fresh new VS2005
Beta DVD, and let it roll on my HD. Then I loaded my project into VS2005 and
it asked if I wanted to upgrade, and of course I answered YES! By the way,
my project is not just an ordinary little project, it contains several
controls, DLLs and a web service. After grinding away for awhile it finally
came to a halt. Now, what were the results? Was I going to be able to do new
wild and wonderful things to my project? Unfortunately, but not
unexpectedly, no. The VS2005 Beta had blown my project to smitherines. It
would not load, it would not do anything. Not only that, but there was very
little recognizable about it. MS has not lost their touch! What I found
especially "cute" about their conversion mechanism, is that instead of
leaving the originaly project intact and creating a new project, they
overwrite the original source code, so that, if you haven't made a backup
copy they efectively exterminate your code. Since I was still in Amsterdam,
I took my production machine in the next day and visited the "Ask the
Experts" booth, to talk to the guy who had given the talk on upgrading to
VS2005. He spent about half an hour looking at it and finally admitted that
He didn't have any idea of what had happened.
So then I had to start manually copying each project back to the
original directories. I had to manually clean up the mess of files that
VS2005 had scattered around the HD. Then I spent several hours trying to get
my project to run again, to no avail. Finally I went into IIS and found that
the upgrader had messed up the IIS configuration settings. After that, my
ASP.NET 2003 project was finally back in working order.
What have I learned? Foremost and above all, MS has not learned any of
the lessons (as if I had expected them to). They will continue to break code
at willl. They are the 800lb. gorilla and they sit where they want and do
what they want and if you don't like it don't work with them.
Gary