External tool call .net code

reactancexlreactancexl Posts: 129

Is the external tool able to call a .net dll file directly? Would it work if the dll is compile as an executable? If so what would be the value of the flag? Would I be able to pass in parameters?

Tagged:

Comments

  • benken_parasoftbenken_parasoft Posts: 744 ✭✭✭
    edited July 22

    Is the external tool able to call a .net dll file directly?

    No. The External tool is only used for launching external applications.

    Would it work if the dll is compile as an executable?

    You could go this route. However, you most likely would need to do a bit more than changing compilation options. Instead of compiling a .NET assembly you would need to compile a .NET application having a "Main" method that acts as the application's entry point.

    Would I be able to pass in parameters?

    You would need to code in such logic into the "Main" method your .NET application.

    However, as a different suggestion, why not use the External tool to launch a PowerShell script instead? PowerShell scripts can access and invoke methods on types from a .NET assembly: How to reference .NET assemblies using PowerShell

Sign In or Register to comment.