Why Does My DLL Work in EXE But Not in PowerShell?
Asked by
CuriousCoder123
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!
Answers
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.
Reply to this answer
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?
Reply to this answer
Add your answer
Answers are reviewed before publication.
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.