I have migrated a VB project from 2008 to 2012. As expected, there are many code modification to meet the migration process. As stated in the title, how can I resolved this error?
Here is the line having the said error:
Dim FSO As Scripting.FileSystemObject
FSO = New Scripting.FileSystemObject
To fix your error you need to add a reference to the FileSystemObject
:
Project>Properties>References>Add>COM>Microsoft Scripting Runtime
But there is absolutely no need to use the FileSystemObject to use the file system.
You can use the fully managed methods in the File
class in the System.IO
namespace: http://msdn.microsoft.com/en-us/library/system.io.file_methods(v=vs.110).aspx