-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for .NET standard #34
Comments
One problem is .NET standard doesn't implement anything like CommandLineToArgv (https://github.com/fschwiet/ManyConsole/blob/master/ManyConsole/Internal/CommandLineParser.cs) so we have that Win32 dependency. This is only needed for the console mode command, so it could be split out. But generally, I don't expect I'll be writing console applications for a non-Win32 platform anytime soon so I don't think I'll have motivation to support .NET standard. When/if I do I might rather do a ManyConsole2 instead (since over time I've found enough things I would do differently). If you're console is only running on Win32 then I think you could split it out such that only the console portion of your code isn't .NET standard. Otherwise you might want to consider https://www.nuget.org/packages/Mono.Options.Core/. ManyConsole extends NDesk.Options which is a prior version of Mono.Options. |
I've enjoyed using ManyConsole (thank you Frank!) and would like to add my support behind using it .NET standard. I'll be watching keenly if you decide to do ManyConsole2. |
While researching how I might help, I discovered this interesting article: https://msdn.microsoft.com/en-us/magazine/mt763239.aspx It seems they've built more into .NET core but I am unsure it will help with this particular issue! |
@brainwipe Support for Microsoft.Extensions.CommandLineUtils has been discontinued. However, Nate McMaster, a software engineer on the ASP.NET Core project, has since forked the project as a community project in his free time. |
@bbrandt I didn't really follow his last commit related to response files. If he does have code that would parse a string representing a line entered at the prompt into an args string[] then yes that should be enough to get ManyConsole running on .Net core. I worry though different platforms might have different behaviors on how this parsing happens, and that needs to be considered as part of becoming cross-platform. One could also just push the part of the code that needs this parsing into a separate package that doesn't become cross-platform (the parsing is used by the ConsoleModeCommand, which I don't think is typically used). I don't have the time/energy to work on it though, nor the need. Happy to answer questions though if people want to run with it. |
I stumbled upon this algorithm which is supposedly what WinAPI uses for |
Apologies @fschwiet, I forgot to tag @brainwipe to indicate I was responding specifically to his comment. I also edited my comment as I realize I added a whole lot of information that was responding to a specific comment instead of being part of the solution we are working towards in this thread. Sorry about the confusion! |
Thank you @bbrandt, I spotted Nate's post and have implemented his library, which does the job well in .NET Core. |
.NET standard is supported in 2.0 |
Any plan on plan on supporting
.NET standard
?Even
1.6
would be enough.The text was updated successfully, but these errors were encountered: