c # excel dll - no se puede agregar una referencia al archivo especificado - regasm
Al desplegar y registrar un.Net
Excel.dll
en otra computadora, me sale un errorCan't add a reference to the specified file
al intentar agregar referencia aDLL
enVBA
editor.
He creado elExcel.dll
enC#
enVisual Studio
que funciona bien en mi máquina conWindows 7
yOffice 2010
. No hay problema añadiendo referencia a la dll enExcel VBA
editor en mi computadora Mi problema es desplegar en otra máquina que está ejecutandoVista
yExcel 2007
. Copié dll a esta computadora y utilicéregasm
para registrar el dll.
¿Alguien puede señalarme en la dirección correcta? Aquí está el código y el regasmo:
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";
}
}
}