Why Does My DLL Work in EXE But Not in PowerShell?

0
4
Asked By CuriousCoder123 On

Hey everyone,

I'm diving into automation and have hit a snag while trying to run my workflow in PowerShell. I've got this EXE compiled using .NET 9.0 that's running like a charm, but when I try to implement the same logic in PowerShell, which runs on .NET 4.5, it's only recognizing one of the two critical methods I need from my DLL. Unfortunately, I can't upgrade the .NET framework on my machine.

So, I'm scratching my head here—why can I access all the methods from the DLL in the EXE, but I'm hitting a wall in PowerShell? If anyone has ideas on how to resolve this or insights into what's causing the issue, that would be super helpful! Here's a link to the interface I'm working with: [https://github.com/LinklyCo/EFTClient.IPInterface.CSharp](https://github.com/LinklyCo/EFTClient.IPInterface.CSharp)

Thanks!

2 Answers

Answered By DebuggingDiva On

I see you linked the library's code, but it would be great to know what exactly you're trying to access. Are you looking for a specific method or class?

CuriousCoder123 -

I’m trying to use the logon and logon response methods. The logon part works in PowerShell, but I can't get back the response code like I do when executing the EXE. I'll share my working C# code for reference.

Answered By CodeNinja99 On

Could you share the specific code you're using? It can help figure out if there's something in the way you’re calling the DLL methods.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.