在另一台计算机上部署和注册 a时,尝试在编辑器中添加对的引用时.Net Excel.dll出现错误。Can't add a reference to the specified fileDLLVBA
我已经创建了Excel.dll在我的机器上运行良好的 in C#in和. 在我的计算机上的编辑器中添加对 dll 的引用没有问题。我的问题是部署在另一台正在运行的机器上,并且. 我将dll复制到这台计算机并用于注册dll。Visual StudioWindows 7Office 2010Excel VBAVistaExcel 2007regasm
谁能指出我正确的方向?这里是代码和 regasm:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\regasm.exe excelDll.dll
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace TestDll
{
[ClassInterface(ClassInterfaceType.AutoDual)]
public class Test
{
public string HelloWorld
{
get
{
return "Hello World";
}
}
public void sayGoodbye1()
{
MessageBox.Show("Say Goodbye");
}
public string sayGoodbye2()
{
return "Say Goodbye";
}
}
}