.Net
Excel.dll
を別のコンピューターにデプロイして登録するときに、エディターでCan't add a reference to the specified file
参照を追加しようとするとエラーが発生します。DLL
VBA
と を使用して、自分のマシンで正常に動作するExcel.dll
inC#
を作成しました。コンピューターのエディターでdll への参照を追加しても問題ありません。私の問題は、実行中の別のマシンに展開することです. このコンピューターにdllをコピーし、dllの登録に使用しました。Visual Studio
Windows 7
Office 2010
Excel VBA
Vista
Excel 2007
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";
}
}
}