参考脚本编译c#csc

时间:2015-01-30 13:48:44

标签: c# interop using csc

我需要通过csc.exe编译这段代码:

using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Scripting;

namespace ConsoleApplication13
{
    class Program
    {
        static void Main(string[] args)
        {
            Scripting.FileSystemObject fso = new Scripting.FileSystemObject();
            Scripting.Folder folder = fso.GetFolder(@"E:\backup_SQL_Planet\");
            Int64 dirSize = (Int64)folder.Size;
            string abc = Convert.ToString(dirSize);
            Console.WriteLine(abc);
        }
    }
}

当我执行csc.exe时,引用(使用Scripting;)

时出现问题

如何使用脚本进行参考?

0 个答案:

没有答案