1

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
2
  • What you replace that with largely depends on what you were using it for. Commented Oct 22, 2014 at 9:28
  • What do you mean about replacing? Commented Oct 22, 2014 at 10:27

1 Answer 1

4

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

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for this informative answer! Now, I understand the flow. Currently using the File class.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.