0

We have a some project with the COM Interop references (is static linked to the project). I created the cake-build script with the reference to this DLL. On the processing:

Task("Build").Does(()=>
{
    NuGetRestore(solutionFile);
    MSBuild(solutionFile);
});

build script has error that my DLL library has a wrong format. Does cake support the COM references? Maybe I need to do something?

Upd. When I build script without references to COM dll, the compiler throws error CS0246 that classes from this DLL doesn't found and that I missing the reference to it.

Ignatii Marine
  • 101
  • 5
  • 9
  • Not 100% sure what your asking about, are you trying to use a com dll within the build script or withing the project you're building? – devlead Aug 09 '17 at 14:53
  • This COM library being used successfully in the project. The problem occurs when I try to build my project with cake. In the script I added this library with the #r directive, and cake doesn't understand this dll. – Ignatii Marine Aug 10 '17 at 06:55
  • If you are not using the COM dll in your build script, there is no need to reference it using the `#r` directive. It can still be part of your project without including it in the build script. – Philipp Grathwohl Aug 11 '17 at 08:24
  • But when I build script without this references, the compiler throws error CS0246 that classes from this DLL doesn't found and that I missing the reference to it. – Ignatii Marine Aug 11 '17 at 09:36

1 Answers1

0

Problem was when we do a build as 'Any CPU'. Changed to 'x86' and dependencies been resolved (Microsoft.VisualBasic.Compatibility.VB6)

Ignatii Marine
  • 101
  • 5
  • 9