Open jackchristel opened 1 year ago
Pty.Net is located in https://github.com/ScottKane/Commander/tree/master/Commander/lib, I would make sure in your IDE it's set to copy to output on build. I can't remember why the dll is bundled directly instead of through nuget at this point as it's been a while since I touched this project. Possibly could migrate to pulling it in as a PackageReference
but there was likely some version compatibility issues and that was why I bundled the dll directly.
I changed it to copy to build, it copies to the build folder, then I do the same thing that made the error happen and it happens again.
Are you running on Windows? If not that might explain it
I am running it on the latest version of Windows 11 and using Visual Studio 2022 as my IDE.
Change Commander.csproj
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
to <RuntimeIdentifier>win-x64</RuntimeIdentifier>
. This was originally made to be used in docker so the RID was set to linux
Oh wait I already changed that in the repo, I just fresh cloned and ran and it works fine for me
Interesting, are you using Windows 11 aswell?
Yes I am using Windows 11, I have just quickly updated things to use con-pty instead: https://github.com/ScottKane/Commander/tree/con-pty
again this is designed to work inside docker as I don't have steamcmd on my local machine as I didn't want to spam install game servers during testing, you should just be able to run commander install 258550
, the format of the output is a bit scuffed since switching to con-pty so I would look at the commented out code for how I buffered this in the past so that you can get a tidier output. The idea was to get just the progress number during an installation and use the shell progress bar examples to convert that incoming number into the percentage completion of the progress bar
Package repo can be found here: https://github.com/WindowsGSM/SteamCMD.ConPTY
Oh thanks. I didn't even realize WindowsGSM already had something like that. I appreciate the help.
So I tried running,
commander install 258550 -u anonymous -s ./
and I get the error below.System.DllNotFoundException: Unable to load DLL 'os64\conpty.dll' or one of its dependencies: The specified module could not be found. (0x8007007E)
Full Error:
System.DllNotFoundException: Unable to load DLL 'os64\conpty.dll' or one of its dependencies: The specified module could not be found. (0x8007007E) at Pty.Net.Windows.NativeMethods.CreatePseudoConsole64(Coord coord, IntPtr input, IntPtr output, UInt32 flags, IntPtr& consoleHandle) at Pty.Net.Windows.NativeMethods.CreatePseudoConsole(Coord coord, IntPtr input, IntPtr output, UInt32 flags, IntPtr& consoleHandle) at Pty.Net.Windows.PtyProvider.StartPseudoConsoleAsync(PtyOptions options, TraceSource trace, CancellationToken cancellationToken) at Pty.Net.Windows.PtyProvider.StartTerminalAsync(PtyOptions options, TraceSource trace, CancellationToken cancellationToken) at Pty.Net.PtyProvider.SpawnAsync(PtyOptions options, CancellationToken cancellationToken) at Commander.Commands.SteamCmdCommand.ExecuteAsync(IConsole console) at Commander.Commands.InstallCommand.ExecuteAsync(IConsole console) at CliFx.CliApplication.RunAsync(ApplicationSchema applicationSchema, CommandInput commandInput) in D:\a\CliFx\CliFx\CliFx\CliApplication.cs:147 at CliFx.CliApplication.RunAsync(IReadOnlyList
1 commandLineArguments, IReadOnlyDictionary2 environmentVariables) in D:\a\CliFx\CliFx\CliFx\CliApplication.cs:191
Seems it has something to do with pty.net but I'm not sure if I'm the only one experiencing an issue like this.