您好,我正在尝试将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