Scripting.FileSystemObject in ASP.NET 4.0

2010-10-23


If you have some old VB code to insert into your new ASP.NET 4 project, and there is "Scripting.FileSystemObject" in your code, maybe you can not compiled it because you will get the error message :

'Scripting.FileSystemObject' can not found.

The solution is Add Reference to an old COM object, the COM object name is Microsoft.Scripting.Runtime. Please see below image, you must know how to add the reference followed the image showing: