Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

External tool call .net code

reactancexl
reactancexl Posts: 160

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_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭
    edited July 2019

    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

Tagged