2
我試圖執行用VBScript
一個腳本,在C#
類庫項目運行VBScript C#
using System.Web.UI; //reference added at top
MSScriptControl script = new ScriptControl();
script.Language = "VBScript";
script.AddObject("Repository", connectToDB.GetRepository);
我得到以下編譯錯誤:
Error CS0246: The type or namespace name 'MSScriptControl' could not be found (are you missing a using directive or an assembly reference?)
任何想法?
他們是同一個命名空間下?或者您是否正確添加了引用? – iJay
@IJ,我正確添加了它 - 只是想澄清添加了該引用。有任何想法嗎? – user3165438