您好,我正在嘗試將compile
我的C#代碼轉換爲要用於VBA script
中的客戶端的.dll文件。使用SOAP Web引用將C#類編譯爲.dll錯誤CS0234
我的C#代碼引用了一個SOAP Web服務,表現不佳。當我運行csc /target:library file.cs
時,我在COM和CS0246 BbsSecurityContext,BbsEntityResult(web服務中的類)上收到以下錯誤CS0234。它說名稱空間SOAPTest
中不存在com
名稱空間。請讓我知道我是否可以提供更多信息。
下面是代碼文件
...
using SOAPTest.com.blueberryhosting.broadviewbbsvcstg;
using System.Runtime.InteropServices;
namespace SOAPTest
{
[Guid("9E5E5FB2-219D-4ee7-AB27-E4DBED8E123E")]
[ClassInterface(ClassInterfaceType.AutoDual)]
public class Webservice
{
private BbsSecurityContext sc;
public Webservice(string apiKey, string sourceSystem, int userID)
{
createSecurityContext(apiKey, sourceSystem, userID);
}
...
public void getInvestors(string filepath)
{
using (BbsInteropWebService ws = new BbsInteropWebService())
{
BbsEntityResult x = ws.GetInvestors(sc);
if(x.Success)
{
generateCSV(x,filepath);
}
}
}
...
哇感謝你回答這個問題賽斯!週三我回去工作時,我會研究這一點。 – 2014-10-20 04:19:03