Link to home
Start Free TrialLog in
Avatar of vielkacarolina1239
vielkacarolina1239Flag for United States of America

asked on

Upgrading window application in vs 2003 to vs 2005.

Hi, I need to upgrade a window application in visual studio 2003 to visual studio 2005, I tried the conversion wizard but there are still many other libraries that need to be fixed. This is one of the error I am getting:  'FileSystemObject' is ambiguous in the namespace 'Scripting'.

Please assist when possible.

Thanks
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Why are you using FSO in a .Net project?...use the System.IO namespace.  VB.Net 2005 specifically has an entire "My.Computer.FileSystem" namespace for working with files as well.
Avatar of vielkacarolina1239

ASKER

I am converting somebody else project.
SOLUTION
Avatar of Priest04
Priest04
Flag of Serbia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Can you show us which line causes the "'FileSystemObject' is ambiguous in the namespace 'Scripting'" error?
this line:

iReadFile = fso.OpenTextFile(sINIInputFile, Scripting.IOMode.ForReading, False, Scripting.Tristate.TristateUseDefault)
So what is "fso" declared as?  Can we see the OpenTextFile() function?
There is not an implementation for OpenTextFile(), I believe is built in, the fso file declaration is as follow
Dim fso As  Scripting.FileSystemObject
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks guys this solved the problem.