我想在 cs-script 中使用 novacode-docx。我怎样才能正确引用程序集。我尝试了以下但没有解决缺少的程序集参考。
//css_reference D:\lib\DocX.dll;
using System;
using System.Diagnostics;
using System.Windows.Forms;
class Script
{
[STAThread]
static public void Main(string[] args)
{
using (DocX doc = DocX.Create(@"C:\Users\name\Desktop\test.docx"))
{
doc.PageLayout.Orientation = Orientation.Landscape;
var table = doc.AddTable(12, 2);
doc.InsertTable(table);
doc.Save();
}
}
}