I am facing a problem while registering the DLL using Regasm from exec task in Nant script. Its giving the below error:
RegAsm : error RA0000 : Failed to load 'C:\MyDir\stage\MyDocumentFetch.dll'
because it is not a valid .NET assembly
Here is the task from my build file:
exec program="regasm" workingdir="C:\Windows\Microsoft.NET\Framework\v4.0.30319\"
commandline="/nologo /tlb ${path::combine(Paths.StagingFolder, 'MyDocumentFetch.dll')}"
The DLL that I am using is .Net 4.0 based and it is surely not the case that is mentioned in http://www.jagjot.com/2014/01/register-c-vb-net-dll-regasm-gacutil/
It is getting registered successfully when I am trying it using command line and the tlb file is getting generated.
I also tried using regasm task but that is not generating the tlb in the path mentioned in the typelib attribute and is just registering the DLL.
Can somebody please help me in resolving this error ?