Free Support Forum - aspose.com

File or Assembly name MacVad or one of its dependencies was not found!

Hi,

I just tried to create a small class library , named it MacVad.cs. It includes
ASPOSE.Excel. Then after i compiled it into MacVad.dll, i was using regasm.exe
to create MacVad.tlb file so i can access this class on my Visual Basic 6 project.


using System;

using Aspose.Excel;

namespace MacVad

{

///

/// Summary description for Class1.

///

public class CreateExcel

{

private string p_filename;

public string FileName

{

set

{

p_filename = value;

}

}

public CreateExcel(){}

public CreateExcel(string v_filename)

{

p_filename = v_filename;

}

public void Process()

{

Aspose.Excel.Excel obj = new Aspose.Excel.Excel();

obj.Save(p_filename);

}

}

}


Then i opened new project in VB6, on project reference i included MacVad. So, the vb6 code is like this:

Private Sub Command1_Click()
Dim obj As New MacVad.CreateExcel
obj.Process
End Sub


but when i execute the program it displayed an error "File or Assembly name MacVad or one of its dependencies was not found!". So, what i have to do then
to make my MacVad.dll that included ASPose.Excel working fine on my VB6 application ?

thanks

Please always put Aspose.Excel.dll in the same folder with your MacVad.dll. When you add MacVad.dll to your vb6 project, I think it’s local copied but Aspose.Excel is not.

You can also try to deploy Aspose.Excel to GAC to solve this issue.

Thx for your reply, but the fact is i already put aspose.excel.dll in the same directory or folder with my MacVad.dll, when i run regasm to create MacVad.tlb file, that file also residing in the same folder with both dll. Then i created vb 6 project in sub folder of current folder , and through VB6 project reference i include MacVad.tlb into my project.

So how machanically MacVad.tlb works when it is called by VB6 project?
VB6 call MacVad.tlb, MacVad.tlb calls MacVad.dll , MacVad.dll call Aspose.excel.dll ? It that correct?


Okinawaman

I am not familiar with VB6 programming. What if you deploy Aspose.Excel.dll in your GAC?

I’ll try it.